Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
ParkITApi/README.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
50 lines (31 sloc)
2.09 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ParkITApi | |
API for ParkIT user model. | |
This README file is about Additional information about theParkIT user model. | |
# Setting up the API | |
- For this application you must have visual studio code installed https://code.visualstudio.com/download | |
- For this API you will need to have node installed: https://www.npmjs.com/get-npm | |
- Then type npm init on the command line to begin setup of node for the api | |
- You will then need install koa-router, koa-bodyparser, nodemon and koa | |
- Will need to download the swagger viewer plugin to see documentation for the api | |
# Running the API | |
For running the API you can navigate to the ParkITApi directory: | |
Then the back end can be run on the terminal by typing nodemon index.js or node index.js | |
## Use Postman for CRUD | |
Once the API back end is running you can then use http request applications like Postman to complete CRUD methods. | |
## Running Unit Tests | |
To run the back end of the API navigate to the ParkITApi directory and type npm test | |
### controllers directory: | |
This directory contains code for setting up the validations for the api using schemas. | |
### docs directory: | |
This directory contains code for the openapi specification documentation for explaining about the sections of the api. | |
Important note you will also, need the VSCode live server plugin for seeing my documenation for the api this will be shown on the demo video. | |
### helpers directory: | |
This directory contains code for running and setting up the queries that are connected to the database of theapi. | |
### models directory: | |
This directory is the code that will be used for running queries that are connected to the database. The models will be linked with the user route so that they can be run for the api. | |
### routes directory: | |
This is a directory for running the user model that were created so they can be linked to the CRUD requests later on. | |
### schemas directory: | |
This directory contains the validations that are set up for the different fields when completing any of the CRUD requests. | |
### node_modules directory: | |
This directory just contains the different directories and modules for the node package. |