Giter VIP home page Giter VIP logo

bagels's Introduction

Bagels

A ticket creation and management platform for delivery drivers.

Formerly known as Bagelr

I'm a pro, just show me the docs

Getting Started - Server

Bagels API is primarily a Rails 5 API server. While it includes a front-end client (WIP) built with create-react-app, the API itself is entirely front-end agnostic.

To get started with the server, you should git clone the project:

git clone [email protected]:/LMulvey/Bagels.git <your folder name>

After that, cd into the server directory and install our wonderful gems:

bundle install

Now you should be ready to launch the API. Start Puma with the address and port that you desire. The port that you choose is important here as we'll be using CRA to proxy requests to the server. We'll be using Port 3001 here.

NOTE: It is best to not use Port 3000 for the API Server as it is the default port for create-react-app.

rails s -p 3001

Starting the prototype client

The client is being built on create-react-app. It is merely a prototype to show how you could interface with the API.

To get started with the client, cd into the client folder located in the Bagels root:

cd client

First, we'll install all our dependencies for create-react-app by running this command while still inside the client folder:

npm install

Next, open up the package.json file inside the client folder. Near the bottom you'll see a line that looks like this:

"proxy": "http://localhost:3001"

This sets us up to automatically forward any fetch or AJAX calls from inside create-react-app to localhost:3001 to we don't need to worry about prefixing our URLs. This is optional and if you wish to customize it, you can.

The port number in this setting should match the port number of the API Server you used above.

After you've edited your package.json, simply start the create-react-app server and you're ready to go:

npm start

After the development server boots, navigate to http://localhost:3000 to view the client.

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.