项目作者: martinavagyan

项目描述 :
Data visualisation for United States
高级语言: JavaScript
项目地址: git://github.com/martinavagyan/us-infographic.git
创建时间: 2018-06-27T08:15:26Z
项目社区:https://github.com/martinavagyan/us-infographic

开源协议:MIT License

下载


The following README provides steps on how to run the code locally.
The application is deployed at: https://usinfo.herokuapp.com/

How to run locally

Run the code: front end

Prerequisites

Make sure to have the following installed on your machine:

  • Node > 8.9 (!important)

    The following is an Angular 6 single page application, therefore it is possible to only run the front end without the server.
    For that run the following commands:
  1. cd client; npm i; npm start

Run the code: back end

Prerequisites

Make sure to have the following installed on your machine:

  • mongoDB (make sure to have mongod running locally when running the code on a local machine)
  • Node > 8.9 (!important)

    Steps

  • Install dependencies. From root directory run:
    1. npm run install:dependencies
  • Create .env file in server folder.
  • Copy the following lines to .env file.
    1. PORT=3000
    2. DEV_DB='mongodb://localhost/us_info_db'
    3. NODE_ENV='development'
    4. JWT_SECRET='change_this_example_secret'
  • (Optional) Add the following to .env file if you want to run MongoDB with cloud provider (e.g. Mlab):
    1. PROD_DB={{the URI provided by mongoDB could providers, e.g. Mlab}}
  • Run the application by starting the client and server separately:
    1. cd server; npm start
    1. cd client; npm start
    This will create the database locally. By running the server with the command:
    1. npm run start:cloud

    Technology stack

    MEAN Stack with TypeScript
  • MongoDB
  • Angular 6+
  • Express
  • Node > 8.9
  • TypeScript
  • JavaScript