Code Monkey home page Code Monkey logo

miimosa-jwt-exercice's Introduction

README

Database Setup

We are using PostgreSQL as databse service After installing it, run in the terminal the following commands.

For Linux:

  sudo -u postgres psql
  CREATE ROLE "miimosa-jwt" LOGIN CREATEDB PASSWORD 'miimosa-jwt';

On MacOS:

  psql postgres
  CREATE ROLE "miimosa-jwt" LOGIN CREATEDB PASSWORD 'miimosa-jwt';

Log out from postgres

Project set up on local

Ruby version:

2.7.1

Run in the terminal after installing bunlder gem:

  bundle install
  bundle exec rake db:create db:migrate db:seed

Running with docker

We have a DOCKERFILE for the rails application and a docker-compose to handle a docker image with the rails app and the postgres database.

To build the image and run it:

docker-compose -f docker-compose.yml up --build

After that we need to create databse and populate it:

docker-compose run web rails db:create db:migrate db:seed

Now we can launch newly the services:

docker-compose up

Run linter

We are using rubocop. We run rubocop on app and spec directory

bundle exec rubocop app spec

Run test

We are using RSpec, before we need to create database for testing enviroment:

bundle exec rake db:create db:migrate RAILS_ENV=test
bundle exec rspec

miimosa-jwt-exercice's People

Contributors

gmarn avatar

Watchers

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