1.4 KiB
1.4 KiB
3Dverse test task
Solution
Technology choosen
Development environment
If the developper has nix flake installed. nix develop will install
all the system dependencies. Otherwise, deno is required; hey,
and psrecord are two useful tool to benchmark the server.
Running the tests.
The best way to build the test is to run nix build .#test which
will output a report in ./result. Otherwise,
deno test --unstable --allow-read=tests tests should run all the tests.
Running the project.
The main file to run the server is src/server.ts. To command line
deno run --unstable --allow-net src/server.ts will run the server locally.
One can add the flag --v8-flags=--max-heap-size=50 to limit the
allowed memory to, in this example, 50mb.
In a similar fashion, it is possible to run the application without checking out the code using the command line
deno run --v8-flags=--max-heap-size=50 --unstable --allow-net https://gitlab.com/didiercrunch/3dverse-testtask/-/raw/master/src/server.ts
Architecture
sequenceDiagram
title: Persist file
client->>RestAPI: HTTP request
RestAPI->>FileService: Persist file metadata
FileService->>BlobService: Persist file