Skip to content

lthieu96/express-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

express-typescript

A node express project boilerplate with typescript

Ref:

Installation

yarn install

Running

yarn dev

Environment Variables

The environment variables can be found and modified in the .env file. They come with these default values:

PORT = 5050
MONGO_USER = user
MONGO_PASSWORD = pass
MONGO_PATH = '@cluster0.ezvhqgu.mongodb.net/?...'

#jwt
JWT_SECRET = yourSecret
# Number of seconds after which an access token expires
JWT_ACCESS_EXPIRATION_SECONDS = 3600
# Number of days after which an access token expires
JWT_REFRESH_EXPIRATION_DAYS = 365

# SMTP configuration options for the email service
SMTP_HOST=email-server
SMTP_PORT=587
SMTP_USERNAME=email-server-username
SMTP_PASSWORD=email-server-password
EMAIL_FROM=support@yourapp.com

API Endpoints

List of available routes:

Auth routes:
POST /auth/register - register
POST /auth/login - login
POST /auth/refresh-tokens - refresh auth tokens
POST /auth/send-verification-email - send verification email
POST /auth/verify-email - verify email

User routes:
POST /users - create a user
GET /users - get all users
GET /users/:userId - get user
PATCH /users/:userId - update user
DELETE /users/:userId - delete user\

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors