/connido-test

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

Contributors Forks Stargazers Issues MIT License LinkedIn

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Installation

  1. Clone the connido-test project (using SSH key)
    git clone git@github.com:ColinCee/connido-test.git
  2. Start using docker
    docker-compose up --build
  3. Make calls to endpoint localhost:3000/article using your API client of choice (Recommend insomnia)
    • POST localhost:3000/article
      {
          "title": "my first article",
          "content": "content",
          "author": {"name": "test1"}
      }
    • GET localhost:3000/article - optional query params you can supply
      • page
      • title
      • authorName
      • Example http://localhost:3000/article?title=my%20first%20article&authorName=test1

Developing

When running the project using docker-compose, the volumes will automatically mount the src folder into the container.

This means you can install dependencies on the host machine:

npm install
  • Then you can use your IDE or text editor of choice and still get intellisense.
    • Recommend using VSCode as I've setup auto-formatting.
  • Any changes on the host machine will hot reload the server thanks to ts-node-dev

Tests

You can either run the tests inside the container or on your host machine:

npm test