diff --git a/README.md b/README.md index 4387bdb..070b9cc 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,22 @@ # Containerized All United Automation -This is a simple script that uses selenium to access data from All United for further automation. +This is a simple API that uses selenium to access data from All United for further automation. It acts as an user because thats the only way to access the data. +All united does not have an API and uses PHP sessions. ## Selenium Selenium is a tool that allows you to automate browser actions. It is used in this project to access the data from All United. ## Get started -Be sure to have an env file with the properties visible in `env.example`. -After that be sure to `npm install` the packages. + - Create a `.env` file with the properties visible in `env.example`. + - Run `npm install` to install the packages. + - Run `docker compose up` to start the container. -### Run -```npm run start``` to run the script which is always headless (No browser).
-If you want to run it with a visible browser comment the headless option ```.addArguments("--headless") // Comment when testing locally``` -inside `index.ts`. +## Cron +The cron is used to call the /synchronisation endpoint every day at midnight.
+The /health route can be used to check the health status of the API. -### Build +## Build For local use ```npm run build``` to build the project.
For docker use:
```docker build -t vslcatena/synchronisation-api -f Dockerfile.prod .``` \ No newline at end of file