Skip to content
This repository was archived by the owner on Nov 15, 2021. It is now read-only.

M4MController/frontend-old

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5070228 · Oct 26, 2018
May 12, 2018
May 12, 2018
May 28, 2018
Aug 13, 2018
Apr 1, 2018
Mar 29, 2018
Mar 18, 2018
May 12, 2018
Apr 6, 2018
Oct 26, 2018
May 10, 2018
Mar 18, 2018
May 10, 2018
May 12, 2018

Repository files navigation

M4M Web App

Running the app

At first clone the repository:

$ git clone git@github.com:M4MController/frontend-old.git && cd frontend-old

Now you can build and run the app, there are several ways to do it:

Using docker

  1. Build the docker image:
$ docker build -t m4m-frontend .
  1. Run a container (replace <PORT> with port you want to listen):
$ docker run -p <PORT>:80 m4m-frontend

Open http://localhost:<PORT> in the browser.

Using npm & node.js

  1. It requires Node.js with npm. Install them.

  2. Install dependencies:

$ npm install
  1. Run the server (replace <PORT> with port you want to listen):
$ PORT=<PORT> npm start

And open http://localhost:<PORT> in the browser.

Using a server

  1. It requires Node.js with npm. Install them.

  2. Install dependencies:

$ npm install
  1. Generate bundle:
$ npm run build

Generated files are located in dist/ directory. For it to work properly, you should use them and public/ as static files on your server. Do it manually, or do the following to run with nginx:

  1. Install nginx.

  2. Copy generated files:

cp -R dist/. /usr/html/
  1. Copy static files:
cp -R public/. /usr/html/
  1. Copy nginx config:
cp nginx.conf /etc/nginx/nginx.conf
  1. Restart nginx:
sudo service nginx restart

Open http://localhost in the browser