https://github.com/arpitgo4/pest-detection-app
Pest Detection App web interface and API server.
https://github.com/arpitgo4/pest-detection-app
docker docker-compose expressjs mongodb mongoose nginx nodejs reactjs redux
Last synced: 3 months ago
JSON representation
Pest Detection App web interface and API server.
- Host: GitHub
- URL: https://github.com/arpitgo4/pest-detection-app
- Owner: arpitgo4
- Created: 2019-04-09T15:31:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-16T10:57:40.000Z (about 7 years ago)
- Last Synced: 2025-02-21T12:19:41.953Z (over 1 year ago)
- Topics: docker, docker-compose, expressjs, mongodb, mongoose, nginx, nodejs, reactjs, redux
- Language: JavaScript
- Homepage:
- Size: 292 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pest Detection App
Pest Detection app with api server in node.js, mongodb as db and web client in react.js.
## Project Structure
```
.
├── api-gateway # Nginx Api Gateway
├── client # React/Redux Web Client
├── db # MongoDB data directory
├── deployment # Deployment config
| ├── development # Docker-compose development config
| └── production # Docker-Compose production config
├── server # Node.js API Server
└── README.md # This file
```
## API Sheet
```
## Postman api collection
https://documenter.getpostman.com/view/401954/S1EL31YD
```
## Environment Variables
```
## Environment variables are defined in the deployment/development/docker-compose.yml
## Environment variables are needed for successfull startup of the server
SERVER_PORT=8080 # Port number for server to listen
MONGO_HOST=mongo:27017 # MongoDB connection url
MONGO_DB_NAME=pest-detection-app # MongoDB database name
JWT_SECRET=U5ZnTwt0tpmUHAVhES51iXM52mFSbxsOojFs5JNnZUv082ZACjnsuRNklomA
# JWT Secret
JWT_HEADER=x-token # JWT Header for REST APIs
REDIS_HOST=redis:6379 # Redis connection url
POST_PEST_API_RATE_LIMIT=5 # Api Rate Limit config, 5 requests per 10 second
```
## Development
```
# Start project in development mode with hot code loading,
cd deployment/development && docker-compose up --build [-d]
# See logs for a container (service in docker-compose)
cd deployemnt/development && docker-compose logs --follow
# Get container (service) shell access
cd deployment/development && docker-compose exec sh
# Enjoy developing :)
```
## Production
```
# Start project in production mode,
cd deployment/production && docker-compose up --build
# Open web browser at http://localhost/api/v1/health
# You will see a response : {}, response_status: 200
```
## Feedback
In case of any query or feedback, please feel free to connect via
* arpit.go4@gmail.com (Arpit Goyal)
Or, open an issue at github.