Forked from dharmayejju/Create a NodeJs AppService and host it on azure
Created
December 6, 2018 03:59
-
-
Save stavrossk/bc32c3be1754b4b6bc58952730edea36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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