Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Node.js-API-Authentication-with-JWT

NotificationsYou must be signed in to change notification settings

ShahFH/Node.js-API-Authentication-with-JWT

Repository files navigation

This repository contains a Node.js API that provides authentication functionality for use in various applications. The API utilizes JWT (JSON Web Tokens) for authentication and MongoDB as its database. It also incorporates Mongoose to create models and connect to the Express server, bcryptjs for password hashing, and jwt to secure private routes.

Technologies Used ⚙

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • bcryptjs
  • JSON Web Tokens (JWT)

Installation ⚒

  1. Clone the repository to your local machine usinggit clone URL
  2. Install the required dependencies: npm install
  3. Set up the MongoDB connection:
Make sure you have MongoDB installed and running.Edit the config.js file to specify your MongoDB connection URL.

Usage

To start the server, use the following command: npm start
The server will be running athttp://localhost:3000 by default. You can change the port by modifying the PORT constant in the index.js file.

Endpoints

The following API endpoints are available:

POST /api/user/loginPOST /api/user/register

Feel free to use, modify, and distribute this code as per the terms of the MIT License. However, please note that this project comes with no warranties. Use it at your own risk.

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp