/task-api

A simple task API in Express with OAuth, Caching, API rate limiting feature

Primary LanguageJavaScriptMIT LicenseMIT

Task API

Add env to .env file see example in .env.sample

Install

npm i

Create client

npm run create_client

Import postman collection & variables & set client informations

To run developement server

npm run dev

To clear unused tokens

npm run clear_tokens

To run express production server

npm start

To run cli

node_modules/.bin/env-cmd ./.env node bin/cli

demo-live

demo CLIENT_ID - dixDTqxxBsd8x9un
demo CLIENT_SECRET - (D\ZJVeP?%ZdA[dJ=?\h%r*D^=g(,n/Z

Need redis, mongo & node version ^11.0.0

Todos

  • Authentication with OAuth2(Password, access token & refresh token grant in redis store)
  • CORS
  • Rate limit
  • Pagination
  • Compression
  • Radis caching
  • S3 image upload(avatar)
  • Database seed
  • Transformer
  • Mails through Gmail
  • CLI for client create, token delete & other features
  • Postman
  • Browser caching add(e.g Cache-Control & Last-Modified)
  • User password change to pbkdf2
  • Client credentials grant
  • Authcode grant
  • Use buffer for secret like password or tokens
  • Command autocomplete CLI
  • Confirm before delete CLI
  • Write tests
  • CI/CD
  • Add email option to someother email service as Gmail has limitation

Contributors

License

MIT