Skip to content

mavolty/final-project-gigih

Repository files navigation

Generasi GIGIH Final Project Backend: Simple Ecommerce API

This repo contains code for generasi GIGIH Final Project in the Backend track. The problem for this project is to make an API for simple ecommerce. Like other ecommerce app, admin can create new menu with categories, also customers can order the menu and many details for the API you can see in the API documentation.

Rails on Replit

This is a template to get you started with Rails on Replit. It's ready to go so you can just hit run and start coding!

This template was generated using rails new (after you install the rails gem from the packager sidebar) so you can always do that if you prefer to set it up from scratch. The only had two make config changes we had to make to run it on Replit:

  • bind the app on 0.0.0.0 instead of localhost (see .replit)
  • allow *.repl.co hosts (see config/environments/development.rb)
  • allow the app to be iframed on replit.com (see config/application.rb)

API Documentation

to test endpoint you can go to API documentation and import the url from there or you can import the collection from exported collection in postman folder. I create API documentation with postman API documentation tool. You can visit the link below to see the detail about API

API Documentation

Clone the repository

git clone https://github.com/mavolty/final-project-gigih.git
cd final-project-gigih

Check your Ruby version

ruby -v

The ouput should start with something like ruby 2.5.1

If not, install the right ruby version using rbenv (it could take a while):

rbenv install 2.5.1

Install dependencies

bundle install

Migrate database

rails db:migrate

Test

to run the test you can run by command below. (actually i prefer to use format document in rspec)

bundle exec rspec -fd

About

Rails with SQLite3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages