The repository contains an API for a simple file server and integration tests for the API.
- Install Docker
- Start server (execute run.bat)
- The step will run docker compose which will install MongoDb and run the API.
- Note: if you have an issue with certificates on this step - try to run the solution in Visual Studio with docker compose (see below), it will install require certificate. After that
run.bat
will also work.
- Make sure that the API is up and running (open: https://localhost:44348/swagger).
- Run integration tests (execute test.bat)
- At the end you will see path to test logs in your console
There are two options:
- Without docker compose
- Install MongoDb, or use MongoDB installed in section Get started (the config file already contains connection string for local database).
- Set FileServer.Api as startup project.
- Use one of two options.
- Press F5.
- With docker compose
You can use any of ApiKeys from configurations to get access to the API.
Note: enter a key prefixed with ApiKey
for example ApiKey 123
.
- Make sure that FIle Server API is up and running.
- Make sure that configurations contains proper URL to File Server API.
- Integration tests implemented based on SpeckFlow. So I would suggest you to install an extenstion for Visual Studio for better usage experience.
- You can find test scenarios in Feature folder
- Once the solution is opened in Visual Studio and built, you can run tests as standart unit tests. Test->Run ALL tests.
- RESTful API for uploading/downloading documents and managing metadata.
- Web API returns meaningful HTTP status codes for all cases
- Server side caching
- Integration tests based on BDD SpeckFlow.
- Dockerfile with docker compose
- Configurable Logging for HTTP incoming requests
- Api versioning and correlation tracking
- Authentication mechanism based on ApiKey.
- There is no SPA client, but https://localhost:44348/swagger allows to upload/download documents and test all functionality available in the API.
- For large files, I would add an API which will allow to upload files in chunks.
- I would add health check endpoint.