/rest-5min

REST API with MERN stack in less than 5 minutes

Primary LanguageJavaScriptThe UnlicenseUnlicense

rest-5min ⌚⌚⌚

This simple REST API can be built in 5 min with MongoDB, Express and Node

Let's go !! 🏃

1" ⌚

  • git clone
  • npm init
  • write README with fancy emojis ✨
  • npm i express mongoose
  • touch index.js
  • write express configuration and route /
  • npm start

2" ⌚

  • npm i mocha chai chai-http expect sinon
  • mkdir test && touch test/index.spec.js
  • write basic tests
  • npm test

3" ⌚

  • setup new Mongo database
  • setup new Heroku app (and add env variable MONGODB_URI)
  • setup Travis-CI repo (and add env variable MONGODB_URI)
  • touch run.sh (and add env variable MONGODB_URI)
  • add fancy badges to README ✨
  • npm run dev

4" ⌚

  • write mongoose configuration and model
  • write CRUD routes

5" ⌚

  • npm run dev test
  • npm run dev
  • test CRUD routes with Postman
  • git commit

Finish line 🏁🏆

What do I need to go that fast ? 💭

Why would I do that ? 💭

  • if you need a REST API
  • if you need it fast
  • if you need it like, really fast