Coder Social home page Coder Social logo

kisi-api-challenge's Introduction

The Kisi Backend Code Challenge

This repository can be used as a starting point for the Kisi Backend Code Challenge. Feel free to replace this README.md with your own when you submit your solution.

This repository contains:

  • A bare-bones Rails 6 API app with a Gemfile that contains the neccessary libraries for the project.
  • A configured adapter (lib/active_job/queue_adapters/pubsub_adapter.rb) to enqueue jobs. Use as a starting point for your own code.
  • A rake task (lib/tasks/worker.rake) to launch the worker process. Use as a starting point for your own code.
  • A class (lib/pubsub.rb) that wraps the GCP Pub/Sub client. Use as as a starting point for your own code.
  • A Dockerfile and a docker-compose.yml configured to spin up necessary services (web server, worker, pub/sub emulator).

The reason we provide a Docker-setup is so that you don't have to set up a real GCP project, and can instead use the emulator. If you prefer not to use Docker, you can ignore the following text.

To start all services, make sure you have Docker installed and run:

$ docker compose up

If you prefer to start each service individually, run:

$ docker compose up web
$ docker compose up worker
$ docker compose up pubsub

To rebuild an image, run:

$ docker compose build web

To restart the worker, i.e. after a code change:

$ docker compose restart worker

To start a console:

$ docker compose run --rm worker bin/rails console

If you want to debug using pry and breakpoints, you might want to start a service manually instead:

$ docker compose run --rm worker bash
# bin/rails worker:run

If you run docker with a VM (e.g. Docker Desktop for Mac) we recommend you allocate at least 2GB Memory

kisi-api-challenge's People

Contributors

jensljungblad avatar dependabot[bot] avatar ce07c3 avatar ozone4real avatar olssonr 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.