Skip to content

Yet-Another-Paste-Bin/yapb_backend_server

Repository files navigation

Yet Another Paste Bin
(RESTful API)

Documentation Maintenance License: MIT

clone or download

$ git clone https://github.com/Yet-Another-Paste-Bin/yapb_backend_server
$ npm i

project structure

LICENSE
package.json
config.js [ENV Vairables]
controllers/
    auth.controller.js
    bin.controller.js
routes/
    auth.route.js
    bin.route.js
middlewares/
    bin_checker.js
    error_handler.js
    jwt_auth.js
    ratelimit_middleware.js
    signup_middleware.js
models/
    bin.model.js
    user.model.js

Usage

Prerequirements

Prepare Enviornment variables

// in the root level
$ export SECRET=YOUR_JWT_AUTH_SECRET
$ export DB_URL=YOUR_MONGODB_CONNECTION_URI
$ export NODE_ENV=YOUR_NODE_ENVIORNMENT
$ export REDIS_DB_URI=YOUR_REDIS_DB_CONNECTION_URI

Start (Development)

$ npm i       // npm install pacakges
$ npm run dev // run it in development mode locally

Start (Production)

$ npm i       // npm install pacakges
$ npm run start // run it in production mode

Dependencies

  • bcryptjs: ^2.4.3
  • body-parser: ^1.19.0
  • cors: ^2.8.5
  • cross-env: ^7.0.3
  • express: ^4.17.1
  • express-rate-limit: ^5.2.6
  • helmet: ^4.6.0
  • jsonwebtoken: ^8.5.1
  • mongoose: ^5.12.2
  • morgan: ^1.10.0
  • rate-limit-redis: ^2.1.0
  • redis : 3.0.2

Author

👤 Tejasvp25

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

TODO ✓

  • Add Support for Bin Sharing

📝 License

Copyright © 2021 Tejasvp25.
This project is MIT licensed.

Releases

No releases published

Packages

No packages published

Languages