Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 install

yarn 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"}'
```