This is the backend of our full stack MERN application, Badjjr.
It follows a RESTful architectural style and has full CRUD functionality. Here is what you can do with the Badjjr API:
Quiz Request | API Endpoint |
---|---|
Get all quizzes | /api/quizzes |
Get quizzes by category | /api/quizzes/:category |
Get a quiz by id | /api/quizzes/:id |
Create a new quiz | /api/quizzes |
Update a quiz by id | /api/quizzes/:id |
Delete a quiz by id | /api/quizzes/:id |
Question Request | API Endpoint |
---|---|
Create new questions* | /api/questions |
Update a question by id | /api/questions/:id |
Delete a question by id | /api/questions/:id |
*You can create one or more questions in a single request.
User Request | API Endpoint |
---|---|
Create a new user | /api/users |
Get an existing user | /api/users/signin |
The backend utilizes MongoDB, Express, Mongoose, CORS, as well as Heroku (for deployment) Passport (for authentication), and Bcrypt (for encryption).
- Fork and clone the frontend repository, and change into the new
badjjr-frontend
directory. - Run
npm i
to download the required dependencies. - Run
npm start
to start your React server.
- Fork and clone this repository, and change into the new
badjjr-backend
directory. - Run
npm i
to download the required dependencies. - Install
nodemon
if it is not already installed on your machine. - Create a
.env
file and add aDATABASE_URL
variable with your MongoDB Atlas connection string. In your string, be sure the change the name of the database to "badjjr". - Run
nodemon
to start your server.
There is always room for improvement! If you have any suggestions, please submit an issue or create a pull request.
✨ Thank you for checking out Badjjr! ✨