This is a repository which contains a basic node web api. The project was created by following the tutorial, in order to have quick access of a functional (hopefully) working version.
The tutorial is availabe here: https://www.youtube.com/watch?v=w-7RQ46RgxU&list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp
Steps for getting started:
-
download and install node (in case you haven't already) https://nodejs.org/en/download/
-
open a comander tool (the standard console, or cmder.exe or whatever)
-
download the code drom my repository
-
navigate to the code in your terminal (in windows the command is: cd \project_path)
-
(recommended but not required) install nodemon using this command: npm install -g nodemon Since you are specifing the -g parameter, you will install it globally so there is no need to install it later Nodemon restarts your application everytime you change a file automatcally. More details about nodemon here: https://www.npmjs.com/package/nodemon
-
run the following commands. Below you may find additional snack-exlanations, you should not copy them. Do not copy the ">" character at the begining of the command. It is just for refference
npm-init
- intialize the project in your folder
npm install express -save npm install ejs -save npm install body-parser -save
- Run your application. Make sure that on your terminal, you are in the folder of your application. Run the command bellow on your commander:
nodemon app
- app is the name of the file which is the entry point of your application
If you have any issues please send me a message on git or an email at sosuliviu@gmail.com