Git Product home page Git Product logo

app.exploreapollo.org's Introduction

app.exploreapollo.org

NASA

Build Status Dependency Status devDependency Status Code Climate

Sauce Test Status

Development

This project requires Node >=4.X and npm >=3.X You should install node using nvm.

Start Hacking

  1. npm install to grab all the goodies
  2. npm run dev to start a hot-reloading development server
  3. No step 3

Other useful commands:

  • npm test to run the tests
  • npm run tdd to continuously run tests as you code
  • npm run lint to check your changes against the linting guidelines

Note about HTTPS and the development server: the development server uses a self-signed SSL certificate. When you open the development server for the first time it will squawk about the certificate being invalid. The certificate is not invalid or insecure, it is just self-signed.

Branches and Versioning

The master is considered "hot" and is continuously deployed to a staging server. Every tagged version is automatically deployed to production.

Day-to-day development is done on the develop branch. The develop branch is continuously deployed to a development server for evaluation.

The development promotion workflow is as such:

  1. Work on a feature branch
  2. Pull request the develop branch
  3. develop branch is merged into master when ready

This project is semantically versioned. Changes that break compatibility with the remote API are considered breaking changes.

Debugging

When in doubt: delete the node modules folder and npm install again.

rm -rf node_modules
npm cache clean
npm i --progress=false

Project Structure

Source lives in src/. Compiled output goes in dist/. Configuration goes in config/.

Source Files

  • containers/: Stateful react components. These are usually top-level route handlers.
  • components/: Stateless/Dumb react components. These guys determininstically render based on props.

Configuration Values

Configuration values are stored in the config/ directory. You gain access to the configuration values by importing the config object from config/index.js. The configuration values are loaded as such:

  1. The values in config/default.js
  2. The values in config/{{APP_ENV}}.js where APP_ENV is an environment variable.
  3. If APP_ENV is not set, config/development.js will be loaded by default.

the logic for loading the config is here.

Example

We use the configuration file to determine the API entry point in our actions.

  1. import the configuration object
  2. use the configuration object
  3. If the APP_ENV is set to staging, this will be the value for config.apiEntry.

Consider the following example commands:

npm run dev                     # runs dev server with development API
APP_ENV=staging npm run dev     # runs dev server with staging API
APP_ENV=production npm run dev  # runs dev server with production API

app.exploreapollo.org's People

Contributors

austinpray avatar coledeanshepherd avatar jamiecrisman avatar bonkeybee avatar dxt121730 avatar jbrady42 avatar greenkeeperio-bot avatar nrajasombat avatar vujita avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.