Git Product home page Git Product logo

mashgin-api's Introduction

Simple Checkout System

This project is part of Mashgin Software Engineer assignment.

You can access the deployed projecy on https://mashgin-api.victorbalbo.com/ hosted by Vercel.

Technologies used

  • node as JS runtime
  • express for web framework
  • TypeScript for variables typing
  • Zod for schema validation
  • Jest for tests

Recommended IDE Setup

VSCode.

Relations

This project is a dependency for the mashgin-webapp. Also the published API can be found at https://mashgin-api.victorbalbo.com/.

Project Setup

This project can run in two ways, using Docker or using Node commands.

Before running this API is necessary to set the Token for GIST access. The token was sent on the email. You can change the default value for the variable githubToken on the file src/constants.ts; Or create a .env file defining the variable value like the exempla bellow:

GITHUB_TOKEN=TOKEN

Docker

To run this project using Docker you will need to have a Docker Engine and Docker CLI installed and running.

Build Image

docker build . -t mashgin-api

Run Image as Container

docker run -p 3000:3000 mashgin-api

This will run the webapp locally though Docker using port 3000. The app will run on http://localhost:3000/

Node CLI

To run this project using Node you will need to have a Node 18+ installed. You can check your node version using the command node -v.

Install Project Dependencies

npm install

Compile and Hot-Reload for Development

npm run dev

This will run the webapp locally using port 3000. The app will run on http://localhost:3000/

Tests

This project uses Jest for unit tests of the controllers and business logic. To run the tests just run the command:

npm run test

What this API do

This API uses Swagger when run locally to document and present the endpoints. Once the API is running locally you can check the docs on the at http://localhost:3000/docs/

mashgin-api's People

Contributors

victorbalbo 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.