8000 GitHub - alexsaldana9/king-tide-api: This is the api used to record tide data.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

alexsaldana9/king-tide-api

Repository files navigation

King-Tide-API

Build Status

Dependencies

- Ruby version - ruby 2.5.0
- postgres 
- sqlite

How to run the app

$ rails s

When dependencies or the database change run this

$ bundle install
$ rails db:create
$ rails db:migrate
$ rails db:seed

How to run migrations in heroku

log into heroku, and run the command below in the online heroku console

$ rails db:migrate

Add a secret key to heroku

$ rails runner "SecretKey.create(name: 'KEY_NAME', key: 'SECRET KEY')"

Delete a secret key from heroku

$ rails runner "SecretKey.where(name: 'KEY_NAME').destroy_all"

How to run the tests

$ rails spec

When the database changes, you need to change the Test database.

$ RAILS_ENV=test rails db:drop
$ RAILS_ENV=test rails db:create
$ RAILS_ENV=test rails db:migrate

Annotate the models

$ bundle exec rake annotate_models

What is annotate?

Deployment instructions

$ git push origin master

Deployment is in Heroku, and build is in Travis CI. Once the bill is OK, then it is deployed to Heroku automatically.

About

This is the api used to record tide data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0