cricketinfo-site
Source for cricketinfo.io
Dependencies
- NodeJS and NPM
- React, as the view library
- NextJS, to render the React app to HTML on the server-side
- Express, to handle requests and pass them on to NextJS on the server-side
Running in Development
-
Make sure NPM and NodeJS are installed on your system.
-
Clone the project repository and
cd
into it.$ git clone $ cd path/to/code
-
Install dependencies from NPM.
$ npm i
-
Run the server in development mode.
$ npm run dev
Running in Production
-
Make sure NPM and NodeJS are installed on your system.
-
Once NPM is installed, install
pm2
globally (may require sudo).$ npm i -g pm2
-
Clone the project repository and
cd
into it.$ git clone $ cd path/to/code
-
Install dependencies from NPM.
$ npm i
-
Build an optimized version of the code.
$ npm run build
-
Start the app using
pm2
.$ pm2 start npm --name "cricketinfo-site" -- start
-
The app runs on port 3000 by default. You might want to reverse proxy requests to the app using Nginx or Apache.
Resources
- The app in production: https://cricketinfo.io