Table of Contents
I was assigned this project as part of Codecademy's Full stack engineering bootcamp. I had to create an entire API to serve information to a Boss Machine, a unique management application for today's most accomplished (evil) entrepreneurs. Leveraging Express.js I created routes to manage the 'minions', the brilliant 'million dollar ideas', and to handle all the annoying meetings that keep getting added to the busy schedule.
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
- Google Chrome (at least version 60) or Firefox (at least version 55)
- npm
npm install npm@latest -g
- Download the project
- Install NPM packages
npm install
- If you have problems, you may have to
npm install --force
- Start local development server
npm run start
- View on http://localhost:4001/
- To run testing
npm run test
- Intial Setup
- Set up body-parsing middleware with the body-parser package.
- Set up CORS middleware with the cors package. You can use the default settings.
- Mount the existing apiRouter at /api. This router will serve as the starting point for all your API routes.
- Start the server listening on the provided PORT. Make sure to use the PORT constant and not a hard-coded number, as this is required for tests to run.
- Minions Routes
- GET /api/minions to get an array of all minions.
- POST /api/minions to create a new minion and save it to the database.
- GET /api/minions/:minionId to get a single minion by id.
- PUT /api/minions/:minionId to update a single minion by id.
- DELETE /api/minions/:minionId to delete a single minion by id.
- Ideas Routes
- GET /api/ideas to get an array of all ideas.
- POST /api/ideas to create a new idea and save it to the database.
- GET /api/ideas/:ideaId to get a single idea by id.
- PUT /api/ideas/:ideaId to update a single idea by id.
- DELETE /api/ideas/:ideaId to delete a single idea by id.
- Meetings Routes
- GET /api/meetings to get an array of all meetings.
- POST /api/meetings to create a new meeting and save it to the database.
- DELETE /api/meetings to delete all meetings from the database.
- Custom Middleware
- Create custom middleware function to ensure that any new or updated idea is worth at least a million dollars.
- Bonus
- Create work routes that allow bosses to add and remove work from their minions' backlogs.
See the open issues for a full list of proposed features (and known issues).
Patrick Alvarez Eades - [email protected]
Project Link: https://github.com/Patchalv/boss-machine
A big shout out to Codecademy who I'm currently doing the Full-Stack Engeineer career path with!