Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hossara/upload_file_gridfs
Upload file into GridFS using fastify.js
https://github.com/hossara/upload_file_gridfs
docker docker-compose fastify gridfs mongodb nodejs nodemon pipeline pnpm stream tap test typescript upload
Last synced: about 2 months ago
JSON representation
Upload file into GridFS using fastify.js
- Host: GitHub
- URL: https://github.com/hossara/upload_file_gridfs
- Owner: Hossara
- Created: 2024-04-15T17:39:55.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-15T22:46:41.000Z (8 months ago)
- Last Synced: 2024-04-15T23:56:38.886Z (8 months ago)
- Topics: docker, docker-compose, fastify, gridfs, mongodb, nodejs, nodemon, pipeline, pnpm, stream, tap, test, typescript, upload
- Language: TypeScript
- Homepage:
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Upload file into GridFS using fastify.js
This has been a research and test project for me to find and test different methods of uploading files and actually the best method of uploading files and saving them in GridFs.I'm using fastify as a server framework and tap as testing framework.
### Build and run
You can use docker to build and test the project. Just run:```bash
dokcer-compose up -d
```
And then the backend is available with port `8085` and Mongo dashboard with port `8005`.If you need to test the code, just run:
```bash
dokcer-compose -f docker-compose.test.yaml up
```
And the tap will run some tests and print you the test results.### Commands
```bash
# To start backend
pnpm start# To build application
pnpm build# To test the code
pnpm test# Run automatically before pnpm build
pnpm prebuild# Run automatically before pnpm start
pnpm prestart
```### Contributors
- Hossein Araghi
- [GitHub](https://github.com/hossara)
- [LinkedIn](https://linkedin.com/in/hossara)
- [Email](mailto:[email protected])
- [Instagram](https://instagram.com/hossara.dev)### Donate me