Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dharmayejju/4306c931ba094029047eb62473114755 to your computer and use it in GitHub Desktop.
Save dharmayejju/4306c931ba094029047eb62473114755 to your computer and use it in GitHub Desktop.
On MacOS terminal
===============
1. Run the following command to install the express generator
~ sudo npm install express-generator -g
2. Create a folder for the application
~ mkdir azurenodejsapp
~ cd azurenodejsapp
3. Just type "express" to create a basic nodeJS app (PS: You can check the express --version after installing)
~ express
4. Run "npm install" to install the dependencies
~ npm install
5. Type the following command to run the application
~ DEBUG=azurenodejsapp:* npm start
Deploy using GitHub
1. Create a repo in GitHub
2. Click on DepolymentOptions in NodeJsAppService and connect to GitHub
3. git init on terminal
4. git remote add repourl (https://github.com/dharmayejju/azurenodejsapp)
5. open solution in vscode
6. add .gitignore file (use template from git/gitignore repo for node.gitignore)
7. commit the changes so far
git status
git add .
git commit -a -m "initial commit"
8. push it to the master branch on azure
git push azureprod master
(PS: authentication failed - follow the steps in the link: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)
9. Add Depolyment slots (like staging)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment