In order to run the project, please follow the following steps:
- Clone the Repo
- Run
go get
orgo mod dowload
orgo mod tidy
API Path | Method | What it does |
---|---|---|
/api/scanAV | POST | scans provided paths and send result to s3, and a email to hardcoded recipients |
Add this varaibles to your .env file
AWS_KEY=""
AWS_SECREY_KEY=""
Make sure that your system is using go 1.19.0,
Run curl -X POST http://localhost:8088/api/scanAv \ -H "Content-Type: application/json" \ -d '{"Paths": ["/tmp/", "/var/tmp/", "/root/apps/dev/svg-ui/"]}'
In order to monitor and check logs will be using PM2
to run Go
binary
- Check for port 8088, proceed to kill if is already been used, with
npx kill-port 8088
- Run
make run
to create new server file - Run
pm2 start ./server --name "svg_scan_av"
- Enjoy