JSON API for todo project built with Roda + Sequel.
git clone [email protected]:maturbanski/todo-api.git
cd todo-api
ruby -v
The ouput should start with something like ruby 3.0.0
If not, install the right ruby 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:https:///todo-api-development
andcreatedb todo-api-development
locally. - Create
.env.test
for test environment. - Add
DATABASE_URL=postgres:https:///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 using rubocop
command.