This is a RESTFUL API for a blog build using nodejs. It is a test and has no specific functions
- CORS - for preventing Cross-Origin Resourse sharing
- Moestif - for tracking API usage
- express - - for developing the API
- Swagger - for documenting and testing the API
- DBDocs - for documenting the Database
- Heroku - for hosting the app
- Git and GitHub - for tracking, storage and version control
- I based the database schema on this design: Link to Schema
- I documented the database using DBDocs: Link to Database docs
- I tested and documented the API routes and responses using Swagger: Link to API docs
- I used feature branches and pull requests in this Project
- I worked documented and fixed bugs using GitHub Issues: Example Issues
-
I chose MySQL for the Database because it would help me practice my SQL queries. I chose to provision the ClearDB MySQL addon from Heroku for this project
-
UI libraries are a great place to find ready-made components that help speed up the dev process. They can also be handy if one only needs a few cusom components. For these reasons, I used
Bootstrap 4
andMaterial UI
to style and build the contact form on this website. -
My plan is to become a FullStack Engineer eventually which is why I chose to work on this project. I built this API using the expressJS framework in NodeJS.
-
I chose to document my RESTful API Server and the database used for ease of access to information about the API and its database.
- The API docs can be found here: Link to API docs.
- The database was documented here: Link to Database docs
- The app has been setup and deployed on Heroku
Alternatively, you can do the following to setup the app locally. Run the commands below in your terminal or CMD:
1 Clone the repo using this command
git clone https://github.com/Dewalade1/simple-backend-app.git
- Change directory to the repo folder
cd <path-to-repository>/simple-backend-app
- Install the dependencies using npm
npm i
- See
Option 2
in theHow to start the app
section below to start the app
- The easiest way to start up the app is to click here
- If you connected successfully, You should see
Welcome to the first API homepage!
written in your browser window.
You can start the app locally or run it on a development environment using the following commands:
- Start app locally
npm start
- Run on a local dev environment
npm run dev
npm start
Starts the app Open http://localhost:8080 in your browser to view it. The page will refresh if you make edits to the code. You will also see any compile and lint errors in the console.
npm run dev
Starts the app using a dev environment Open http://localhost:8080 in your browser to view it. The page will refresh if you make edits to the code. You will also see any compile and lint errors in the console.
- The API docs allow users test the API by clicking the 'Try it out' button.
- validate data using express-validator
- Hash the Passwords using BScript