global-electrification-platform / explorer

Global Electrification Platform (Web)
https://electrifynow.energydata.info/
MIT License
10 stars 7 forks source link

GEP Explorer

Web application to explore least electrification scenarios on Global Electrification Platform.

Installation and Usage

The steps below will walk you through setting up a development environment for the frontend.

Install dependencies

Install the following on your system:

Clone this repository locally and activate required Node.js version:

nvm install

Install yarn:

npm install -g yarn

Install Node.js dependencies:

yarn install

Config files

The config files can be found in app/assets/scripts/config. After installing the project, there will be an empty local.js that you can use to set the config. This file should not be committed.

The configuration is overridable by environment variables, expressed between []:

Example:

module.exports = {
  dataServiceUrl: 'http://localhost:3000',
  mapboxAccessToken: 'asfd23rlmksjdf023rnnsafd'
};

Development

Start server with live code reload at http://localhost:9000:

yarn serve

Build to production

Generate a minified build to dist folder:

yarn build

Links & References

License

MIT