Your task is to build a REST API using TypeScript with Node.js that returns data from sqlite database.
The database.sqli
file is a database that includes 3 tables:
- users - each row represnts a single user
- albums - albums of a user
- images - images of an album
The entities_sample.txt
file includes the structure of the tables and sample data of each table.
The API should have the following endpoints:
- Get User by user Id
- Get User and Albums by user Id
- Get Albums and Images by user Id
- Endpoint should include support for pagination
- Endpoint should include support for sorting by album title
- Clone this repository to your private account.
- .... develop .....
- Once you are ready, create a pull request from your private repo and branch to the original repository.
- There should be at least one test written and the README file should include instructions on how to execute it.
- You should provide clear documentation of the API, you can use Swagger or any other format.
- The app should build without errors (typically using
npm run build
). If there are necessary steps required to get it to compile, those should be covered in the README.md. - No crashes or bugs.
- Code is easily understood and communicative (eg. comments, variable names, etc).
- Everything that you decide to not do due to the limitation of time should be documented in the README.
- GitHub commit history is consistent, easy to follow and understand.
- npm install
- npm start