Git Product home page Git Product logo

unl-igem-safety-case's Introduction

igem-safety-case

JavaScript Style Guide

Generate a safety case diagram.

Development

Quick Start

  • Install Node.js for your machine (LTS or Current is fine)
  • Create a file named .env
    • Contains values that should never be committed to the repository
    • Refer to example.env as an example. Replace all variables as needed.
  • In the terminal
    • npm install to download project dependencies
    • npm start in one terminal for the server-side portion
    • npm run dev in the another to serve the frontend portion

Scripts

  • npm run build - Compiles the frontend code
  • npm run dev - Runs the frontend code in development mode. Autoreloads the browser upon file changes.
  • npm run lint - Lints the files for consistent code styles
  • npm run lint:fix - Fixes most lint errors
  • npm run lint:type - Type checks the code using typescript
  • npm start - Runs the server-side portion. Uses port 3000 by default.
  • npm test - Runs the linter, typechecker, then the test suite

Workflow Description

  • Description: Feature Branch Workflow
  • Essentially, create a new branch for every feature/change being implemented.
  • Each change should have an opened pull request.
  • Each pull request should be reviewed (if available).

Deployment

Services

  • mLab - MongoDB hosting service
  • Heroku - Server hosting service
  • Netlify - Static-site hosting service

Instructions

For the instructions below, I'm assuming that you have made an account on these sites.

  • mLab
    • Create New MongoDB Deployment
    • Follow the instructions. Choose whatever provider/price is appropriate. (Free tier available)
    • View the created database
    • In the Collections tab, create 3 Collections
      • users
      • diagrams
      • diagramNodes
    • In the Users tab, create a database user
      • This gives read/write access to the database
      • Remember the username and password, it's used in the standard MongoDB URI
        • It is the DB_HOST environment variable
  • Heroku
    • Note: Install the Heroku CLI (https://devcenter.heroku.com/articles/heroku-cli)
    • On the dashboard, create a new app
    • In the settings tab of the app
      • Click: Reveal Config Vars
      • Set the DB_HOST and TOKEN_SECRET variables
    • In the deploy tab of the app
      • Follow the instructions for using the CLI
      • Push the application using git push heroku master
      • It should then run automatically
  • Netlify
    • In the wepback.prod.js file, change the server URL to the new Heroku app's URL
    • Build the application bundle: npm run build
    • Under the sites page, drag-and-drop the dist directory that was built onto the site
    • The site should then be live
    • Updates can be uploaded to the same site under the Deploys tab

unl-igem-safety-case's People

Contributors

markh817 avatar

Watchers

James Cloos avatar  avatar

unl-igem-safety-case's Issues

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.