JSON API for todo project build with Roda + sequel
git clone [email protected]:Harritone/roda-todo-api.git
cd todo-api
ruby -v
The output shouldt start with something like ruby 3.0.0
If not, install the right version.
Using Bundler
bundle install
This project uses PostgreSQL by default, to setup database for development and test environment use following instructions:
- Create
.env.development
for development environment. - Add
DATABASE_URL=postgres:///todo-api-development
andcreatedb todo-api-development
locally - Create
.enve.test
for test environment. - Add
DATABASE_URL=postgres:///todo-api-test
andcreatedb todo-api-test
locally
- To migrate database in development environment use:
rake db:migrate
- To migrate database in test environment use:
RACK_ENV=test rake db:migrate
- To migrate database in production environment use:
RACK_ENV=production rake db:migrate
.
You can start your application using rackup
command.
You can generate documentation using rake docs
command.
You can launch tests using rspec
command.
To populate data with seeds use rake db:seed
command.
To check code style use rubocop
command.