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

https://github.com/akashpawar43/starter-code

starter code for project with authentication and file and folder structure setup already
https://github.com/akashpawar43/starter-code

access-token authentication-service bcryptjs cookies custom-authentication expressjs jwt-authentication jwt-tokens node-starter-kit nodejs postgre prisma refresh-token starter-code typescript zod-validation

Last synced: 4 months ago
JSON representation

starter code for project with authentication and file and folder structure setup already

Awesome Lists containing this project

README

        

## Starter code for project

### start postgres locally
```
docker run -e POSTGRES_PASSWORD=mypassword -d -p 5432:5432 postgres
```

### db url
```
postgresql://postgres:mypassword@localhost:5432/mydb?schema=public
```

### create .env file in root folder and add above url
```
DATABASE_URL = "your_db_url"
PORT = 4000
JWT_SECRET = "your_jwt_secret"
JWT_REFRESH_SECRET = "your_jwt_refresh_secret"
```

### setup prisma
```
npx prisma init
npx prisma generate dev --name init
npx prisma migrate
```

### start dev server
```
npm run dev
```

### build server
```
npm run build
```

### run build
```
npm run start
```