GithubHelp home page GithubHelp logo

shilcof / backend-track-builder Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 68 KB

Ruby on Rails RESTful API, using a postgres database protected by bespoke written validations to ensure posted data meets the applications requirements, and to filter malicious data.

Ruby 99.30% HTML 0.70%
backend rails ruby restful-api

backend-track-builder's Introduction

backend-track-builder

Backend code for track-builder, a javascript single page web application (git repo here https://github.com/Shilcof/frontend-track-builder) where users can build and submit tracks to a database handled in the backend by Ruby on Rails.

When viewing tracks, a 'car' is generated for each user that can be driven around the track. Using websockets, the location of the car is braodcast to any other user that is also viewing that track so that they can race each other on it.

Installation

track-builder was developed using Javascript and Ruby on Rails.

To run track-builder on your machine, you must first download the files from this repository and the backend. On the backend you must change into the main directory in your terminal.

Then you must use bundler to install the required gems.

bundle install

To set up the database for the application and seed it with dummy data, you must run:

rails db:migrate

Usage

To run the application on your computer you can host it with:

rails s

and then in the front end repository open the index.html page in your browser.

To stop hosting the aplication, simply enter control + 'C' into the terminal where it is running.

Also in the trackAPI.js file you must amend the port and websocket address to the localhosting that you use. Then open the index.html file in your browser.

From here you can create your own tracks, and if you use separate private browser windows, will be able to see cars moving in each page.

Contributing

Pull requests are welcome. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The application is available as open source under the terms of the MIT License.

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.