Small Nest.js-based project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.6 KiB

# Assignment
2 years ago
## Datawrapper Test Project: Backend
### Overview
The project is to create a web service that takes screenshots of websites.
The service should expose an API that a client can use to create a new
screenshot request, with any given URL as a parameter.
The web service should then return a status URL that the client can
periodically call to receive updates on the status on its request.
The web service should take a screenshot of the provided URL.
Once the screenshot was taken, it should be possible for the client to retrieve it.
The service should be designed in a scalable fashion, so that it can handle
varying amounts of parallel requests in a stable and efficient fashion.
The API notation can be defined as you see fit.
### Technology stack
* Server-side code should be written in JavaScript or TypeScript
* It should be possible to run the application locally (ideally as a
containerized application, but other technologies are allowed as well)
* Any other tools, technologies or frameworks can be used at your discretion
* A hosted version of the application to test is a plus, but not a must
### Delivery
The project should be delivered as a Github repository.
It should be possible to run the service locally.
# Commands
## Configuration
Check `.env`
## Installation
```bash
$ npm install
```
## Running the app
```bash
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
```
## Test
```bash
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
```
**Note that you need to have redis running locally in order to run e2e tests**