Git Product home page Git Product logo

lvm's Introduction

Literacy Volunteers of Massachusetts Application

Information

Build Status

Thanks to BrowserStack for allowing us to use their Browser Testing suite for free under the Open Source plan.

BrowserStack Browser Testing

Environment Setup

  • Checkout the repository and change directories to it.
  • Be sure to update config/default.json if you are running locally or on development.
    • The database_url, database_user, and database_password fields should all have values.
    • For local and development work, these will be the same as what is currently on the Confluence page (AWS Setup Information).
    • To ensure that this file is never checked in with the database username or password, run the following command: git update-index --assume-unchanged config/default.json
  • Run npm install
  • Set the environment:
    • Development: export NODE_ENV=development
    • Production: export NODE_ENV=production
  • Start the application: node app/index.js

When running locally, you can just run: ./start.sh development in the app directory.

Framework Overview

This application uses an express-train framework on top of express for organization of application files.

  • app/ - Contains the core components of the application
    • controllers/ - Contains the server-side controllers. Each should be a separate component.
    • lib/ - Contains application setup files.
      • app.js - Sets up express and returns an instance for other components to use (ie. router for route generation)
      • constants.js - Server-side constants for use in multiple controllers.
      • envConfig.js - Environment configuration information (ie. database config file path).
      • logging.js - Configures application logging.
      • middleware.js - Configures middleware components, static file serving, sets up router, and implements application-level error handlers.
      • routes.js - Configure the application's routes and what function should be called should the route be hit.
      • server.js - Configures the server to listen on the specified port.
      • statusCodes.js - Constant list of status codes to be used in multiple components.
      • views.js - Configures application for rendering views (ie. *.hbs files). Typically used if server-side values need to be rendered into the HTML/JS for the client.
    • middleware/
      • errorMiddleware.js - Configures application level middleware to catch errors, log them, and gracefully indicate the error to the client.
    • protected/ - Static HTML, CSS, JavaScript, etc. files to be served to the client that are protected and only accessible to users that are logged in.
    • public/ - Static HTML, CSS, JavaScript, etc. files to be served to the client.
    • views/ - Views to be rendered (*.hbs) for the client.
    • index.js - Configures express-train to be able to automatically inject app dependencies into controllers or components.
  • config/ - Local/Default configuration file location.
    • default.json - Default configuration file. Should be stored in a different location on Production/Development environments and will typically contain database username/password. Passwords should not be checked into the repository.
  • doc/ - Documentation directory
    • api/ - API Documentation
  • scripts/ - Scripts directory
    • database/ - Database scripts
    • dataImport/ - Historical data import scripts
  • test/ - Tests
    • server/ - Server-side tests.
    • client/ - Client-side tests.

lvm's People

Contributors

anakorolev avatar chaviland7 avatar duncanbeard avatar eelgarten avatar enoyes-infinio avatar hulnis avatar mrodrig avatar sonofdouglas avatar zack avatar

Watchers

 avatar  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.