Simple application with JWT Authentication.
App routes:
/
- just outputs "Ok" for testing app/auth/login
- user authentication/auth/register
- user registration/auth/refresh
- update refreshToken/auth/logout
- user logout/users
- list all registered user/users/:guid
- find user by guid
All dependencies can be viewed in the file package.json
.The application is based on the framework Koa
.
Data storage in MongoDB
and Mongoose
ODM. For run app and run tests locally, used mongodb-memory-server
module, by default it holds the data in memory. Also it's used to run in Docker container.
Jest
and Supertest
was used for testing.
Install all dependencies
yarn install
Run project locally
yarn start
Run test locally
yarn test
Build app in container
docker-compose build
Run build app
docker-compose up