https://github.com/ngugimuchangi/alx-files_manager
REST API for managing and sharing files
https://github.com/ngugimuchangi/alx-files_manager
api bullmq express jobqueue mongo-db
Last synced: 4 months ago
JSON representation
REST API for managing and sharing files
- Host: GitHub
- URL: https://github.com/ngugimuchangi/alx-files_manager
- Owner: ngugimuchangi
- Created: 2023-03-31T10:51:50.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-27T12:29:38.000Z (over 2 years ago)
- Last Synced: 2025-04-07T11:47:26.387Z (about 1 year ago)
- Topics: api, bullmq, express, jobqueue, mongo-db
- Language: JavaScript
- Homepage: https://ngugimuchangi.me/alx-files_manager/
- Size: 513 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 0x04. Files manager




Simple file management API that allows users to:
- Upload files
- Retrieve information about the files
- Download the files
- Share uploaded files with other users
## How to Run
Clone the repo
```
git clone https://github.com/ngugimuchangi/alx-files_manager.git
```
Install required dependencies
```
cd alx-files_manager
npm install
```
Start worker
```
npm run start-worker
```
Start express server
```
npm run start-server
```
## Environment
Environment variables you can adjust when running the express server
- `PORT`: express server's port
- `DB_HOST`: mongodb's server host address
- `DB_PORT`: mongodb's port
- `DB_DATABASE`: database to use
- `FOLDER_PATH`: absolute path to folder to store files
## Documentation
The API's documentation is available at
[here](https://ngugimuchangi.me/alx-files_manager/)
## Tests
Specify different `DB_DATABASE` and `FOLDER_PATH` environment when running test
to avoid data loss in main database and folder. Check out [test](tests/) folder
for unit tests.
- Run specific test
```
DB_DATABASE='test_database' FOLDER_PATH='/tmp/test_folder' npm test tests/testFile.js
```
- Run all tests
```
DB_DATABASE='test_database' FOLDER_PATH='/tmp/test_folder' npm run test-all
```
## Authors
- [Duncan Ngugi](https://github.com/ngugimuchangi)
- [Samule Ekati](https://github.com/Samuthe)