Giter Club home page Giter Club logo

laptop-sticker-friends's Introduction

Friends from the Trail app

Local Development

In order to speed up local development, env vars can be written to a .env file instead of being requested each time the server process starts.

A helper file is included to write the necessary values to the .env file:

./bin/write-env laptop-sticker-friends

Using a Local Database

You'll want to use a local database if your editing the schema or making other data changes. If not you can use the $DATABASE_URL written to your .env file above.

Create a config/local.json file with your local database information like this. You'll need to make sure this database table is created locally.

{
  "db": {
    "user": "lukekarrys",
    "database": "friends-from-the-trail"
  }
}

And then run migrations and seeds to setup the database with the required data:

npx knex migrate:latest
npx knex seed:run

Using the server database

Create a config/local.json with the following and then it will use the server database connection from the .env file:

{
  "db": "${DATABASE_URL}?ssl=true"
}

Running the App

npm start

If you want to simulate production

NODE_ENV=production npm start

Deploying

The client files in app/ will be built along with each deploy.

Kafka Topics

Required topics are listed in config/default.json#kafka. They can be created by running:

heroku kafka:topics:create "$(heroku config:get KAFKA_PREFIX)submission-app"
heroku kafka:topics:create "$(heroku config:get KAFKA_PREFIX)change-background"

Region Flag

The design contains a flag that will be changed depending on the REGION environment variable. The possible values are: dublin, frankfurt, oregon, sydney, tokyo, virginia. If no valid value is set then it will default to a Heroku flag.

laptop-sticker-friends's People

Contributors

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