Coder Social home page Coder Social logo

loany's Introduction

Loany

Description of the development process

I've started by implementing the business logic: the Scoring part. First I've done the Agent to store the amounts. Then I've implemented the Scoring service with the selection of the highest amount. Then the prime number calculation has been added.

After this the Phoenix part has been started. Migration & the entity has been created.

Once this was working correctly, the routes has been defined.

  • route : GET /requests/id/accepted
  • route : GET /requests/id/rejected

Hence the form has been created with data persitence. Then the scoring logic has been added to the creation of the changeset.

When a basic system was running, data validation has been added. Then some styling has been added with the javascript redirection after 3 sec on the rejected page.

How to launch the project ?

Setting the db

A dockerized version of PG is used:

  • launch it with the command: docker run --rm --name pg_loany -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres postgres:10

  • get the IP of the DB with the command: docker inspect pg_loany | ack IPAddress

  • set the correct hostname of the db in the dev.exs and test.exs.

  • create the db with the command: mix ecto.create

  • run migrations: mix ecto.migrate

Launch test

Once the db is up, launch tests with mix test.

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Install Node.js dependencies with cd assets && npm install
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

loany's People

Contributors

bcaccinolo avatar qbeek42 avatar

Watchers

 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.