Skip to content

Dev Instructions

Marcus Hamilton edited this page Feb 12, 2018 · 4 revisions

Getting Started

These instructions will show you how to get the web service up and running on your own local server using node.js. (This will need updating after merging with the firebase hosting/authentication stuff).

Prerequisites

- An internet connection
- Modern internet browser (Chrome, Firefox)
- Node.js v6.11.5
- Node package manager (nvm is recommended)
  • To properly run this web service you will need to have Node.js v6.11.5 installed. It is recommended to use a Node.js version manager since we need a specific version to work with firebase. First lets install nvm with the following command:

    curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
    
  • After installing nvm and restarting your terminal, we can now install Node.js:

    nvm install v6.11.5
    
  • We should check to make sure we are on the proper Node.js version with:

    nvm current
    
  • If the version is not set to v6.11.5 after running nvm current, you can do so with the command:

    nvm use v6.11.5
    
  • After verifying node.js is on v6.11.5, navigate to the /functions directory within the project and run:

    npm install
    
  • This should install the needed dependencies. Now you need to log-in to firebase by navigating to the root directory of the project and run:

    firebase login
    
  • This will redirect you and ask you to sign in to a google account. Make sure you sign in with the team gmail pinned in Slack.

Firebase Local Host

  • Assuming the prerequisites have been set up, you should be able to local host the project with firebase by running the following in the root directory of the project:

    sudo firebase serve --only functions,hosting
    
  • Once this is done you may navigate to http://localhost:5000/ in your browser.

Built With

  • Bootstrap - Web styling
  • three.js - JavaScript framework for 3D components
  • Node.js - Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

Additional Tools

Clone this wiki locally