- Check all requirements from this file. Then check API requirements
- Clone the repository
- Create branch from master with name
test-<email>
. Please specify email on that we have send invite - You will start from
src/
folder. All your written code will be there. - You can use any nodejs framework that supports by "chai-http" module (Express, Koa, Fastify and etc). Or write on the pure http module. It's only up to you.
- Open file
src/index.js
. Your entry point will be here and export by default you app instance. (It's instance will be used in tests). - After finishing a work, please run
npm test
command and check that all tests are passed. - Then in GitLab create new "Merge Request" where source branch it will be you
test-<email>
branch and target will bemaster
branch. Title of merge request setTest work: <email>
. InAssignee
field please set our developer@kostyazgara
, then submit merge request.
- Using MongoDB as main database.
- Good project structure. Separate controllers, services, data layer
- Validation requests and responses.
- Implementation of cursor pagination
- All tests should be passed
- Properly handled errors
- Use typescript
- Use pure mongodb drive, without any ODM like Mongoose
image
should be a separate collection- Do not touch files with tests, expect one thing
- For properly test going you should complete 2 functions -
createPosts
andremovePosts
. Please, use comments near there functions for understanding how it should work
- For properly test going you should complete 2 functions -
- Feel free to organize your application structure as you want.
- Feel free to use any libs from npm.
- Project and tasks understanding - 30 minutes
- Project set up (clone repository, install dependencies) - 30 minutes
- Build models and schemas - 1 hour
- Develop controllers - 2 hour
- Develop validation - 1 hour
- Develop business logic (services for processing main functionality, such as get posts, create posts and etc) - 3 hours
- Test passing - 1 hours
- Refactoring - 1 hour
Total time to accomplishing test assignment - 10 hours. If you feeling that writing tests taking more time that estimated, please don't spend more time and send us everything that is ready!
For additional questions, please don't hesitate to contact with me k.zgara@seedium.io (Kostya Zgara, developer of Seedium)