GithubHelp home page GithubHelp logo

cfu's Introduction

GA CFU Web API (codename: TBD)

Express server supporting a realtime check for understanding app.

Set Up

Sequelize

The app uses Postgres and Sequelize as an ORM. Migrations, Seeds, and DB config are managed by an executable sequelize-cli which is a dependency of the project and can be run locally or installed globally and run without the path to the local module. Checkout this blog post and/or part 1 of this tutorial for more examples of how sequelize-cli works.

Also checkout this example express app.

sequelize-cli is configured in .sequelizerc and related files are kept in js/db. You need a postgresql server running locally (checkout Postgres.app) with a database cfu_development (can use createdb cfu_development from the command line). Next run migrations using sequelize-cli:

use command sequelize if package installed globally and node_modules/.bin/sequelize if just locally

$ sequelize db:migrate

Sequelize [Node: 7.9.0, CLI: 2.7.0, ORM: 3.30.4]

Loaded configuration file "js/db/config/config.json".
Using environment "development".
== 20170511233928-create-cfus: migrating =======
== 20170511233928-create-cfus: migrated (0.022s)
== 20170512003243-create-cfuscores: migrating =======
== 20170512003243-create-cfuscores: migrated (0.018s)

Models are defined in js/db/models. New models can be created with migrations using sequelize-cli as described by scotch.io. Checkout the semantics of the command with sequelize help:model:create.

Express

cfu's People

Contributors

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