Git Product home page Git Product logo

champ's Introduction

CHAMP

Convert HTML A M P

need we say more?

Getting Started

$ git clone [email protected]:nypublicradio/champ
$ cd champ
$ npm i
$ npm start

Development

This package comes with debug as a dependency to assist with logging during development. Setup a new logger by following the directions in the debug repo. Please namespace any new loggers with champ:.

$ npm start will turn on all the loggers in the champ: namespace by default. Use $ npm run debug to see more verbose output (e.g. from express itself).

When NODE_ENV is set, the application-level loggers will be disabled. NOTE that any library loggers will still be turned on, i.e. $ NODE_ENV=prod npm run debug will still display output from the express loggers.

Application Layout

Express looks for templates in the views directory by default.

Each site implementing a set of AMP templates should add a new folder to views and a new route to routes to handle fetching, data management, and rendering the template.

Notes on Deployment

NODE_ENV must be set to production in order for the app to run in production mode. Note that this value is also passed to sentry for categorizing uncaught exceptions, so set it to demo in the demo infra.

Configuration

Legend

Symbol Translation
Not required.
Required in "live" (prod & demo)
🔴 Required in "live", local, and test envs

NOTE test values are retrieved from .env.sample.

Values

Required? Config Value Description
🔴 GOTHAMIST_HOST Protocol and host to gothamist fastboot backend.
NODE_ENV Acceptable values are "prod", "demo", or "dev".
PORT Port number on which to run server.
SENTRY_DSN DSN value for error reporting to sentry.

champ's People

Contributors

dependabot[bot] avatar jgitlin-nypr avatar ncastro-nypr 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.