Skip to content
This repository has been archived by the owner on Dec 28, 2019. It is now read-only.

yhagio/sensei-server

Repository files navigation

codecov Build Status License: MIT dependencies Status devDependencies Status

Sensei Server

  • Sample backend server built with Node.js, Typescript, Express, TypeORM, Postgres stack

Start 🚀

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 way 🐳

docker-compose -f docker-compose.dev.yml up

TODOs 👷

  • 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)

Routes 🚙

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

About

✎Sensei server - Node.js / Express / Typescript / Postgres / TypeORM/Apollo-Server/GraphQL stack

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published