Skip to content

REST API for Expense Trail app made with NodeJS, Express, and MongoDB

License

Notifications You must be signed in to change notification settings

shalomj/expense-trail-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expense Trail API

REST API for Expense Trail app made with NodeJS, Express, MongoDB, and TypeScript

Setup

Install dependencies

npm install

Configuration

Create .env file and setup environment-specific variables.

NODE_ENV=local
PORT=5000
DB_CONNECTION=mongodb://localhost/expensetrail
MIGRATE_dbConnectionUri=mongodb://localhost/expensetrail
JWT_ACCESS_TOKEN_SECRET=secret

JWT secret key

You can generate secret key for JWT using NodeJS Crypto module

$ node
> require('crypto').randomBytes(64).toString('hex');
'5e76c258d276f6965abe0e418d829aeb339d6d8182dec5a8729558c8e8811780e18caa8910fc71d7a00ac1375f348041d45c34c163a2f41640b0036b938ea8f9'

Run TypeScript build

tsc

Usage

$ npm start or npm run dev
Connecting to database...
Server running on port 5000
Database connected: localhost

About

REST API for Expense Trail app made with NodeJS, Express, and MongoDB

Resources

License

Stars

Watchers

Forks

Packages

No packages published