stock-market-india icon indicating copy to clipboard operation
stock-market-india copied to clipboard

How to run the project?

Open sumitguptaravi opened this issue 4 years ago • 4 comments

Hi ,

I have a small request for you, can you please tell me the steps for run this project? It will be very big help for me to learn.

Thank You.

sumitguptaravi avatar Feb 29 '20 08:02 sumitguptaravi

Let's get step by step here.

Identify the location for your application.

Firs identify the location where for your application. Let's take it as /home/user/your_app. The path doesn’t matter, so feel free to locate the directory wherever it is best for you.

Installing Node.js

Here is where we will set up Node.js and Express. Node.js is a framework and Express provides a web server. The webserver we need does not need to do anything fancy. The only feature that the webserver needs are the ability to provide static files.

To get started download and install Node.JS: nodejs.org

Install Express

Express is a package that executes within Node.js. To install express, in the Command Prompt navigate to your directory for the application which is /home/user/your_app.

Now let's install Express as a package for Node.js. At the command prompt type “npm install express”. That installed Express and should have created a directory called “node_modules”.

Start Express Web Server in Node.js

In the terminal confirm you are at the /home/user/your_app directory and execute the following command.

node app.js 3000

Now the webserver should be running on port 3000 and you should be able to access the APIs.

maanavshah avatar Apr 15 '20 11:04 maanavshah

Hi,

Did this resolve the setup of this project?

PS., if it helps, please close the issue.

maanavshah avatar May 28 '20 09:05 maanavshah

node app.js 3000 /opt/stock-market-india/bse/service/API.js:92 ...response, ^^^

SyntaxError: Unexpected token ... at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:549:28) at Object.Module._extensions..js (module.js:586:10) at Module.load (module.js:494:32) at tryModuleLoad (module.js:453:12) at Function.Module._load (module.js:445:3) at Module.require (module.js:504:17) at require (internal/module.js:20:19) at Object. (/opt/stock-market-india/bse/index.js:1:73)

getting above issue while run app.

sachinbanugariya avatar Aug 20 '20 11:08 sachinbanugariya

you could try deleting the node_modules folder and package-lock-json and try running npm install again. and then run node app.js 3000

Nahdus avatar Sep 20 '21 14:09 Nahdus