Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CODevOp/express-rest-API

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
5 Commits
 
 
 
 

Repository files navigation

Building a simple REST API with NodeJS and Express.

Tutorial Source: https://medium.com/@onejohi/building-a-simple-rest-api-with-nodejs-and-express-da6273ed7ca9

Commands to create and run application

  • Create a git repsository Reference: https://stackoverflow.com/questions/46877667/how-to-push-a-new-initial-project-to-github-using-vs-code
    git init
    git commit -m "Initialization of repository"
    git remote add origin "https://github.com/CODevOp/express-rest-API.git"
    git remote -v
    // before running the following command create the respository on github.
    git push -u origin master
  • Push updates to git repository
    git push -u origin master
    
  • Initialize a new express application
    npm install -g express-generator
  • Install express in your application
    npm install express --save
  • Run express app
    node app.js
  • Ctrl-C to stop server
  • Before adding/updating the repository add .gitignore file to prevent git from adding node_modules.
    // copy the file from github using raw file and curl command
    curl -o .gitignore "https://raw.githubusercontent.com/github/gitignore/master/Node.gitignore"
    git add .gitignore // adds new files
    git commit -m "Add .gitignore file" // commits change
    git push - u origin master
    

About

quick REST API with express

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.