This project summarizes the back-end trimester, covering authentication, NodeJS, MongoDB, Redis, pagination, and background processing. The goal is to create a platform for file upload and viewing.
- John Mburu
- Kate Wuyep
Read or watch:
- Node JS getting started
- Process API doc
- Express getting started
- Mocha documentation
- Nodemon documentation
- MongoDB
- Bull
- Image thumbnail
- Mime-Types
- Redis
- GitHub repository: alx-files_manager
- Clone the repository
- Install dependencies:
$ npm install
- Start the server:
$ npm run start-server
- User authentication via token
- List all files
- Upload new files
- Change file permissions
- View files
- Generate image thumbnails
- Back-end: NodeJS, ExpressJS
- Database: MongoDB
- Caching: Redis
- Queue Management: Kue
- JavaScript: ES6
By the end of this project, you should be able to:
- Develop an API using Express
- Implement user authentication
- Manage data storage in MongoDB
- Utilize Redis for temporary data storage
- Implement and manage background workers
- Allowed editors:
vi
,vim
,emacs
,Visual Studio Code
- Files interpreted/compiled on Ubuntu 18.04 LTS using node (version 12.x.x)
- All files must end with a new line
- Mandatory
README.md
file at the project root - Use
.js
extension for all JavaScript files - Code linting with ESLint
package.json
.eslintrc.js
babel.config.js
Create utils/redis.js
with RedisClient
class for managing Redis operations.
Create utils/db.js
with DBClient
class for managing MongoDB operations.
Setup Express server in server.js
and define routes in routes/index.js
with endpoints for status and stats.
Add POST /users
endpoint in routes/index.js
and implement logic in controllers/UsersController.js
to create users.
Implement user authentication endpoints in routes/index.js
, handled by AuthController.js
and UsersController.js
.
Implement POST /files
endpoint in routes/index.js
and logic in controllers/FilesController.js
for file upload.
Implement endpoints in routes/index.js
and controllers/FilesController.js
to retrieve and list files.