Skip to content

Personal ExpressJS app created with the goal of serving all of my client / frontend services.

License

Notifications You must be signed in to change notification settings

joaocasarin/selfapi

Repository files navigation

SelfAPI

build status code coverage top language

This project was built with the goal of learning TypeScript + Jest + ExpressJs. It should be splitted into microservices, but since it will be only for personal use, it's going to be a monolythe. The SelfAPI is a simple RESTful API, which contains a variety of endpoints, and all of them will be consumed by some kind of front-end of mine.

Summary

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Documentation

Please visit this website to view the full documentation with all the application endpoints.

Installation

  1. Clone this repo on your local machine:
$ git clone https://github.com/joaocasarin/selfapi.git
$ cd selfapi

To install and set up the project, run:

$ yarn install

Or if you prefer using NPM:

$ npm install

Usage

Serving the app

$ yarn dev

Running the tests

$ yarn test

Alternatives

  • Enable coverage report
$ yarn test:cov
  • Run only UNIT tests WITH coverage report
$ yarn test:unit
  • Run only INTEGRATION tests WITH coverage report
$ yarn test:int

Building a production version

$ yarn build

This command will create a production version of the project inside your local dist/ folder

Serving the production version

$ yarn start

This will use node for serving your already generated production version of the project.

Note this requires Building a distribution version first.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b feat/my-new-feature
  3. Add your changes: git add .
  4. Commit your changes: git commit 'Add some feature'
  5. Push to the branch: git push origin feat/my-new-feature
  6. Submit a pull request 😎

License

MIT License © Joao Casarin