Giter Club home page Giter Club logo

le-voucher's Introduction

Le Voucher

📋 Descrição

This application is an API for a small clothing store. The API offers two routes: one for creating vouchers and another for applying these vouchers. The intention of this application is to study tests with JEST.


💻 Technologies and Concepts

  • REST APIs
  • Node.js (Express)
  • TypeScript
  • Postgres
  • PrismaORM
  • Joi
  • Jest
  • Supertest
  • Nodemon

🚀 Routes

POST /vouchers
    - Route to create a voucher
    - headers: {}
    - body: {
        "code": "voucher1234",
        "discount": 10, (must be between 1 and 100)
      }
POST /vouchers/apply
    - Route to apply a voucher
    - headers: {}
    - body: {
        "code": "voucher1234",
        "amount": 100, (must be greater than 0)
      }

🏁 Running the application

This project was started with the Express, so make sure you have the latest stable version of Node.js and npm running locally.

First, clone this repository on your machine:

git clone https://github.com/williameiji/le-voucher.git

Then, inside the folder, run the following command to install the dependencies.

npm install

Finished the process, just start the server

npm run dev

If you want to run the tests

npm run test:unit

le-voucher's People

Contributors

williameiji avatar

Watchers

 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.