Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/alan2207/express-server-jwt

A simple express server that handles JWT authentication
https://github.com/alan2207/express-server-jwt

authentication express jwt jwt-authentication node prisma rest-api server

Last synced: about 2 months ago
JSON representation

A simple express server that handles JWT authentication

Awesome Lists containing this project

README

        

# Express Server JWT

A simple server with JWT authentication with the ability to create new users, and to authenticate the existing ones.

## Stack

- express
- prisma
- passport
- jwt

## Endpoints:

- /signin - POST (email, password)
- /signup - POST (email, password)
- /user - GET (protected)

## Get Started:

Download the repo and install all dependencies:

```
git clone https://github.com/alan2207/express-server-jwt
cd express-server-jwt
npm install
```

Configure server environment variables:

```
cp .env.example .env
```

Generate Prisma Client

```
npx prisma generate
```

Run Prisma migration

```
npx prisma migrate
```

Run the server:

```
npm start
```