anuragmishra1 / hacker-news-backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hacker News Backend Server

To build the project follow below steps:

  • Install NodeJS, if not installed (Require Node version >= 8.0.0)

    $ wget -qO- https://deb.nodesource.com/setup_8.x | bash - $ sudo apt-get install -y nodejs

  • Install npm, if not installed (Require NPM version >= 5.0.0)

    $ sudo apt-get install npm $ sudo npm install -g yarn

  • Install mongodb, if not installed

    Install mongo from here

  • To build the application

    $ yarn $ npm install -g pm2

  • To run the application with customized ENV variable

    $ HOST=localhost PORT=3000 yarn start

  • To run the application with default settings

    $ yarn start

  • Start with PM2

    $ pm2 start ./server.js --start --name 'hacker-news-backend'

Open API explorer here: http://localhost:3000/explorer

About


Languages

Language:JavaScript 100.0%