- Sample backend server built with Node.js, Typescript, Express, TypeORM, Postgres stack
Start Postgres and set up
CREATE database sensei_dev;
CREATE user sensei_dev_user with password 'password';
GRANT all privileges on database sensei_dev to sensei_dev_user;
ALTER USER sensei_dev_user with superuser;
If you don't have uuid extension in Postgres, run this when you connect to your database
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
Start Node.js application (Recommend to use nvm and yarn 😊)
nvm use
yarn
npm run dev
You can customize env variables in ./config
docker-compose -f docker-compose.dev.yml up
- Basic Application structure
- Express App + Postgres setup
- TypeORM
- Basic CRUD API for Courses
- User Authentication (JWT)
- Protected routes middleware
- LICENSE
- Circle CI
- Codecov
- Stripe integration
- Unit tests
- Integration tests
- Deployment (Heroku)
Prefix: /api
Route | Method | Description |
---|---|---|
/signup | POST | |
/login | POST | |
/courses | GET, POST | |
/courses/:id | GET, PUT, DELETE | |
/user/account | GET, PUT |
...in progress
Route | Method | Description |
---|---|---|
/forgot_password | POST | |
/courses/:id/learn | GET | |
/user/cart | GET, POST, PUT | |
/user/purchased | GET | |
/teaching | GET | |
/teaching/courses/:id/manage | GET, POST, PUT |