Skip to content

Latest commit

 

History

History

frontend

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

metasphere - COVID-19 Research - Frontend

For frontend development.

Getting Started

Prerequisites

You need the following software installed,

Installing dependencies

Please take the following steps to install dependencies,

  1. Suppose you are in the frontend directory of this repository.

  2. Install Node modules.

    npm ci
    

Building a front-end application

This project uses Webpack to build a front-end application. Please take the following steps to build a front-end application,

  1. Suppose you are in the frontend directory of this repository.

  2. Run build.

    npm run build
    
  3. You will find a dist directory that contains an index.html file and other scripts.

Starting a local server

You can locally test the front-end application with a server running on localhost. Please take the following steps to start a local server,

  1. Suppose you are in the frontend directory of this repository.

  2. Start a server.

    npm start
    
  3. The server will start listening at localhost:9090.

When you no longer need the server, hit Ctrl+C on the console.

Starting a development server

It is tiresome to rebuild the application and restart the server every time you change the code. If you run a webpack-dev-server in the background, it takes care of building and reloading. Please take the following steps to start a development server,

  1. Suppose you are in the frontend directory of this repository.

  2. Start a development server.

    npm run dev
    
  3. The development server will start listening at localhost:9000.

  4. Edit the code.

  5. The development server automatically build and reload a new application.

  6. Repeat the steps 4 and 5.

When you no longer need the server, hit Ctrl+C on the console.