To get a local copy up and running follow these simple steps.
- Docker
- Docker Compose
- Node (For local development only)
- Clone the connido-test project (using SSH key)
git clone git@github.com:ColinCee/connido-test.git
- Start using docker
docker-compose up --build
- 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
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
You can either run the tests inside the container or on your host machine:
npm test