Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannyboy313 committed Dec 4, 2023
1 parent ab4a29e commit 4056dcf
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).<br>
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. <br>
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.<br>
For docker use: <br>
```docker build -t vslcatena/synchronisation-api -f Dockerfile.prod .```

0 comments on commit 4056dcf

Please sign in to comment.