Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khanhtc1202/images-submit
https://github.com/khanhtc1202/images-submit
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/khanhtc1202/images-submit
- Owner: khanhtc1202
- Created: 2019-06-23T13:58:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T19:57:16.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T22:23:29.695Z (about 1 month ago)
- Language: JavaScript
- Size: 411 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Images converting system
## Up
From root scope of this project run command like below.
```
$ docker-compose up -d --build
```Check with `ps`
```
$ docker-compose ps
Name Command State Ports
--------------------------------------------------------------------------------------------------
database docker-entrypoint.sh redis ... Up 6379/tcp
images_app_1 docker-entrypoint.sh sh -c ... Up 0.0.0.0:5555->3000/tcp
images_worker_1 sh -c python worker.py Up
job-queue docker-entrypoint.sh rabbi ... Up 25672/tcp, 4369/tcp, 5671/tcp, 5672/tcp```
## Usage
App server available at `http://localhost:5555` and serves 2 main functions:
- Upload an image
- Get image thumbnail by idUpload image:
```
$ curl -F 'file=@/{path-to-your-image-from-root-/}' http://localhost:5555/image
7e5dbeb5-1cc7-49b7-9663-2f6f31fed767 // return an uuid for uploaded image
```Get image thumbnail:
```
$ curl -XGET http://localhost:5555/image/{uploaded-image-uuid}/thumbnail > out.png
```## Test web server
Note: please up the system before run test
```
$ cd webserver
$ yarn install
$ yarn test
```## TODO
- [ ] Add more tests
- [ ] Persistent Store Redis DB
- [ ] Add check service status endpoints