This is the content to expect from the documentation:
- About the webapp
- Tech Stack
- Module/Dependencies
- What am I missing?
- Contribution
- How developers can use this web application
- Instalations
- Runnning the web application
Registration web application is a app that allows users to enter registration numbers and filter according to a particular city to get registration plates from that city.
This is how the application looks like and you can get to play around the application on: http://registration-backend.herokuapp.com/.
The technology that we are using on the application its MongoDB, ExpressJS and NodeJS.
- MongoDB is responsible for ensuring that our data its persistent. To learn more about MongoDB please read up at https://www.mongodb.com.
- ExpressJS is a NodeJS framework that is responsible for routing with the middle-wares. To learn more about ExpressJS please read up at https://expressjs.com.
- NodeJS is our server for the application. To learn more about NodeJS please read up at https://nodejs.org.
Our application is deployed at heroku so that anyone anywhere can access it.
The dependencies that I used on the application is body-parser, express, express-flash, express-handlebars, express-session and mongoose. This is where you can find and read more about each packages, https://www.npmjs.com.
-
BodyParser is responsible for parsing request bodies in a middleware before your handlers. This is how you install body-parser.
-
Express is a web framework for node.
-
Express-flash is responsible for making for creating flash messages, to make the application interactive.
-
Express-handlebars is responsible for creating templates.
-
Express-session is an express middleware that stores sessions.
-
Mongoose it helps us to facilitate the communication between our application and the mongo database.
- I didnt do any test on on my application, you may need to install mocha or any testing of your choice and do test to make sure every function on the application does what its intended for.
- I didn't do toUpperCase to make sure that my registration plates when they are rendered to the screen are I displayed in capital letters.
What else am I missing? Nothing is impossible, everything its better in its beta form. Feel free to contribute if you feel there is something I didn't do.
If you'd love to contribute and make the application better:
- Create an issue and tell me about the idea (maybe I can help).
- Fork the application to your github account so that you'll have rights to commit and push.
- Clone your forked version of the application to your local machine.
- To clone the application you click on the clone/download button, copy the web URL and run the clone command on your terminal.
git clone URL
You first need to check if you have any node version on your machine by running this command:
node -v
if you don't have have nodejs on your machine, follow the commands on this [link]:(https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions).
Run this command on your terminal to install all the packages installed on the application:
npm install
If you don't have mongo installed on your local machine, follow the commands on this link (this only works for ubuntu-16-04 distributions). By installing this this will allow you to save the registration plates on the database.
On your cloned application, run this command on your terminal:
nodemon index.js
This commanding will start running the express server and will log a port on which the application is running on, ofwhich in this case its port 3000.
On your browser go to http://localhost:3000 thats where you'll be able to see the application.