Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to Do Deployment of Repository on Public Server in Node.Js App

    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 521
    Answer it

    Can any one tell me how to Deployment Repository / Scourse Code To a Server ...

    Like For Localhost:3000 

    We need to locate our Scourse Code Folder then  Run File on Powershell then Put Commend :

    nmp install

    Then after that we need to open Mongo DB ( database ) and create a database on C drive ...


    Need to put this commend on powershell :

    node ./app.js

    Done Localhost:3000 link will work... 

    How to do same work on public server I have a domain also I have a Server from Google Cloud ...

 1 Answer(s)

  • You need to setup the server for your NodeJs application.
    Create a Linux machine on Google cloud, install MongoDB and NodeJS on it (make sure to use the same version which you used while development) Or you can use pre-built compute engine offered by Google cloud as well it depend on your need.

    When you completed the Infra setup next step is to put your code on to the machine and follow these steps:
    • Install npm packages 
      npm install
    • Run the application 
      node <pathToFile.js>
    • To run application on background use PM2 or forever.
      pm2 start npm -- start
Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: