Giter VIP home page Giter VIP logo

racing-cars-api's Introduction

Racing Cars API

Basic racing cars API sample app

Start the Application via Docker Compose

The application is using Docker so simply run:

docker-compose up

This starts up two services: the Rails API and the Postgres DB.

Using Docker for the Terminal

Since Docker is used we need to first start the applicaton as mentioned above. Then start a terminal session in the running api container like so:

docker exec -it api bash

After that we can run any rails related commands in the running container.

Also check the Makefile for other useful commands.

Create and seed database and call endpoint

Create the database and add seed data using the standard rake commands and then navigate to http://localhost:3000/api/v1/cars/lamborghini_aventador to view the JSON response from the endpoint.

Try also passing a track name as follows: http://localhost:3000/api/v1/cars/lamborghini_aventador?track=Nurburgring

Run tests in Docker

From within a running Docker container session run the specs as follows

rake spec

Applicaton creation

The application was built in Docker using the following command:

docker-compose run api bundle exec rails new . --force --no-deps --skip-test-unit --api --database=postgresql

racing-cars-api's People

Contributors

jensendarren avatar

Watchers

 avatar James Cloos 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.