Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

JSON API for todo project built with Roda + Sequel. Source code for "Ruby on Roda" book.

NotificationsYou must be signed in to change notification settings

MatUrbanski/todo_api

Repository files navigation

JSON API for todo project built with Roda + Sequel.

Clone the repository

git clone git@github.com:maturbanski/todo-api.gitcd todo-api

Check your Ruby version

ruby -v

The ouput should start with something likeruby 3.0.0

If not, install the right ruby version.

Install dependencies

UsingBundler:

bundle install

Setup Database

This project uses PostgreSQL by default, to setup database for development and test environment use following instructions:

  1. Create.env.development for development environment.
  2. AddDATABASE_URL=postgres:///todo-api-development andcreatedb todo-api-development locally.
  3. Create.env.test for test environment.
  4. AddDATABASE_URL=postgres:///todo-api-test andcreatedb todo-api-test locally.

Migrate database

  1. To migrate database in development environment use:rake db:migrate
  2. To migrate database in test environment use:RACK_ENV=test rake db:migrate
  3. To migrate database in production environment use:RACK_ENV=production rake db:migrate

Running the app

You can start your application usingrackup command.

Generating documentation

You can generate documentation usingrake docs command.

Launching tests

You can launch tests usingrspec command.

Seed database

To populate data with seeds userake db:seed command.

Check code style

To check code style usingrubocop command.

About

JSON API for todo project built with Roda + Sequel. Source code for "Ruby on Roda" book.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp