Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emrd/nodejs-user-control-with-sql
https://github.com/emrd/nodejs-user-control-with-sql
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/emrd/nodejs-user-control-with-sql
- Owner: EmrD
- Created: 2024-08-15T19:45:06.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-15T19:52:05.000Z (3 months ago)
- Last Synced: 2024-08-15T21:47:10.776Z (3 months ago)
- Language: Visual Basic 6.0
- Size: 2.08 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# User Registration and Login Application
This project is a Node.js application for simple user registration and login functionalities. It uses MySQL to store user data, and passwords are securely hashed using the `bcryptjs` library.
## Requirements
- Node.js
- MySQL
- `npm` or `yarn` (package manager)## Installation
### 1. Clone the Repository
```bash
git clone
cd
```### Install Dependencies
```bash
npm installyarn install
```### Start the Server
```bash
node index.js
```### cURL Examples
## Register
```bash
curl -X POST http://localhost:3000/register \
-H "Content-Type: application/json" \
-d '{"username": "testuser", "password": "password123"}'
```## Login
```bash
curl -X POST http://localhost:3000/login \
-H "Content-Type: application/json" \
-d '{"username": "testuser", "password": "password123"}'
```