Skip to content

Commit

Permalink
Merge 43e5630 into 87ee238
Browse files Browse the repository at this point in the history
  • Loading branch information
doppelganger9 committed Feb 17, 2019
2 parents 87ee238 + 43e5630 commit 035a29d
Show file tree
Hide file tree
Showing 64 changed files with 2,115 additions and 4,232 deletions.
8 changes: 8 additions & 0 deletions .codeclimate.yml
Expand Up @@ -6,3 +6,11 @@ plugins:
enabled: false
fixme:
enabled: true

exclude_patterns:
- "test/"
- "postman/"
- "**/node_modules/"
- "dist/"
- "coverage/"

7 changes: 5 additions & 2 deletions .travis.yml
@@ -1,15 +1,18 @@
language : node_js

node_js :
- lts/*
- "10"
- "11"

cache: npm

before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build

install:
- npm install
- npm ci

script:
- npm test
Expand Down
32 changes: 18 additions & 14 deletions README.md
Expand Up @@ -2,40 +2,40 @@

![Table Football picture](https://source.unsplash.com/7de474KZIbs/270x180)

[![Build Status](https://travis-ci.org/doppelganger9/babyfoot.svg?branch=master)](https://travis-ci.org/doppelganger9/babyfoot) [![Dependency Status](https://beta.gemnasium.com/badges/github.com/doppelganger9/babyfoot.svg)](https://beta.gemnasium.com/projects/github.com/doppelganger9/babyfoot) [![Coverage Status](https://coveralls.io/repos/github/doppelganger9/babyfoot/badge.svg?branch=master)](https://coveralls.io/github/doppelganger9/babyfoot?branch=master) [![Known Vulnerabilities](https://snyk.io/test/github/doppelganger9/babyfoot/badge.svg?targetFile=package.json)](https://snyk.io/test/github/doppelganger9/babyfoot?targetFile=package.json) [![BCH compliance](https://bettercodehub.com/edge/badge/doppelganger9/babyfoot?branch=master)](https://bettercodehub.com/) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/22e54b8ae86b4bf2a8f6172899d4a91a)](https://www.codacy.com/app/doppelganger9/babyfoot?utm_source=github.com&utm_medium=referral&utm_content=doppelganger9/babyfoot&utm_campaign=Badge_Grade) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdoppelganger9%2Fbabyfoot.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdoppelganger9%2Fbabyfoot?ref=badge_shield) [![Maintainability](https://api.codeclimate.com/v1/badges/6df9f2100fc61a97bcf2/maintainability)](https://codeclimate.com/github/doppelganger9/babyfoot/maintainability)
[![Build Status](https://travis-ci.org/doppelganger9/babyfoot.svg?branch=master)](https://travis-ci.org/doppelganger9/babyfoot) [![Coverage Status](https://coveralls.io/repos/github/doppelganger9/babyfoot/badge.svg?branch=master)](https://coveralls.io/github/doppelganger9/babyfoot?branch=master) [![Known Vulnerabilities](https://snyk.io/test/github/doppelganger9/babyfoot/badge.svg?targetFile=package.json)](https://snyk.io/test/github/doppelganger9/babyfoot?targetFile=package.json) [![BCH compliance](https://bettercodehub.com/edge/badge/doppelganger9/babyfoot?branch=master)](https://bettercodehub.com/) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/22e54b8ae86b4bf2a8f6172899d4a91a)](https://www.codacy.com/app/doppelganger9/babyfoot?utm_source=github.com&utm_medium=referral&utm_content=doppelganger9/babyfoot&utm_campaign=Badge_Grade) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdoppelganger9%2Fbabyfoot.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdoppelganger9%2Fbabyfoot?ref=badge_shield) [![Maintainability](https://api.codeclimate.com/v1/badges/6df9f2100fc61a97bcf2/maintainability)](https://codeclimate.com/github/doppelganger9/babyfoot/maintainability)

## Goals

- Applying simple CQRS/ES and DDD.
- Creating a REST API based on Node + Express + TypeScript.
- Unit Testing with coverage > 80%
- REST API documentation, samples & testing with PostMan + NewMan (CLI automation)
- Exploring GitHub platform possibilites & integrations
- Exploring GitHub platform possibilites & integrations (CI/CD, NPM dependencies update Automation, etc.)

## Usage

- clone this repository
- `npm install`
- `npm test`
- `npm start`, keep the process running and:
- clone this repository somewhere on your local environment with `git clone https://github.com/doppelganger9/babyfoot.git` (or the SSH URL if you prefer)
- install all dependencies with `npm install`
- you can check the unit tests with `npm test`
- then you can run the server API with `npm start`, just keep the process running and in another shell:

- `npm newman`
- run the API tests with `npm newman` which will use PostMan on the CLI
- OR : open localhost:3000
- OR : use PostMan and import collection + environment and start testing !
- then, CTRL+C on the `npm start` process.
- OR : use PostMan and import collection + environment and start manually exploring the API
- then, CTRL+C on the `npm start` process to stop the local development server.

## Unit Testing

`npm test`

Unit Testing is done with Chai, Mocha, TypeScript.
Unit Testing was done by leveraging [Chai](https://www.chaijs.com/), [Mocha](https://mochajs.org/) and [TypeScript](https://www.typescriptlang.org/).

It definitely helped me:

- see my Domain in action without a UI layer on top (manual testing).
- find a ton of errors, and fix them!
- debug in vscode to go step-by-step and inspect variable contents
- refactor blindly once everything was covered, yay!
- see my Domain in action without a UI layer on top (manual testing);
- find a ton of errors, and fix them! even before using the API "for real";
- debug in vscode to go step-by-step and inspect variable contents;
- refactor blindly once everything was covered, that's the real deal 😎!

## PostMan collection & automated REST API testing

Expand Down Expand Up @@ -74,6 +74,10 @@ See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)

Well, I'm honored you are even thinking about contributing to this project 🤗

This is one of many side project, made for fun, and to explore some concepts and technology I was not using on my daily job.

I will not be actively maintaining it, just looking from afar, coldly, waiting for your contributions (issues, comments, questions, PRs..), or for my curiosity to arise again.

I do not have set up a proper CONTRIBUTING.md guide 🤭 so let's just say all contributions are welcomed 😉.
You should follow our Code of Conduct 🤝.
Use the GitHub platform 😎:
Expand Down

0 comments on commit 035a29d

Please sign in to comment.