The project to train people who is new developer about RestAPI and NodeJS .
- NodeJS is a popular backend programming language with JS
- MVC is a design pattern to seperate codes as Model, View, Controller
- Express is a routing module for NodeJS.
- MySQL is a Database Client for RDMS.
Node.js is an open source, cross-platform runtime environment for developing server-side and networking applications. Node.js applications are written in JavaScript, and can be run within the Node.js runtime on OS X, Microsoft Windows, and Linux.
First of all, you need to node.js PPA in our system provides by Nodejs official website. We also need to install python-software-properties package if not installed already. You can choose either to install Latest Node.js version or LTS version.
$ sudo apt-get install curl python-software-properties
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
Secondly , we must install NodeJS and NPM . NPM will be installed with NodeJS.
$ sudo apt-get install nodejs
Please to install on Windows , follow the offical download page.
MySQL, the most popular Open Source SQL database management system, is developed, distributed, and supported by Oracle Corporation. The MySQL website provides the latest information about MySQL software.
For simplicity and clarity, we will install the package application called XAMPP in the setup. This application will install basic components for MySQL server.
To install,
- Open the XAMPP official download page.
- Select installer for your OS, installation will start automatically.
- Go to Download Folder and extract compresed files.
- Change this folder's permission to 777 . ( May using terminal is more efficient !)
- To start installer (in the same destination with installer),
$ sudo ./xammp-installer-name
For simplicity and clarity, we will install the package application called XAMPP in the setup. This application will install basic components for MySQL server.
To install,
- Open the XAMPP official download page.
- Select installer for your OS, installation will start automatically.
- Go to Download Folder and start installer.
After clone or download this repos,
$ cd path/for/application/root/folder
$ npm install
After clone or download this repos, With CMD,
$ cd path/for/application/root/folder
$ npm install
A sample data set is provided with the application. You just import the database to your MySQL Servers.
To import the databases ( both of OS are in the same ) ,
- Please run XAMPP
- Please turn on Apache and MySQL Servers in XAMPP Control Panel (just click on 'Start' button and waiting for being online)
- Open any Internet browser and go to 'localhost/phpmyadmin'
- Create a database which named same with provided database ( in /database )
- Select created database and go to Import page.
- Import the provided database.
To start server ,
- Open Terminal
- Go to application folder and start server,
$ cd path/for/application/root/folder
$ npm start
To start server ,
- Open CMD
- Go to application folder and start server,
$ cd path/for/application/root/folder
$ npm start