Skip to content

Commit

Permalink
README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansurf committed May 27, 2024
1 parent 6fecd9a commit 6fe988c
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,18 @@ Change `.env.example` to `.env`

| Variable | Description|
| -------- | ------- |
| `PORT` | The port you want to open to run the application. Default = 8000 |
| `SMTP_SERVER` | The email server you are using. Default = smtp.gmail.com |
| `EMAIL` | The email you will send the report from. |
| `EMAIL_PW` | The sending email's password |
| `EMAIL_RECEIVER` | The email that will receive the report (your personal email) |
| `COMMAND` | The command that will be ran and shown in the email. Default = `localhost:8000` |
| `SUBJECT` | The email's subject. Default = Surf Report |
| `WEBSITE` | Enable/disable the frontend. Default = False(disabled) |

**config.json**

| `port` | The port you want to open to run the application. Default = `8000` |
| `ip_address` | The ip your server is running on. Default = `localhost` |


**Email Server**

Expand All @@ -127,22 +131,9 @@ Execute by running `python3 send_email.py`. Running with cron is a good use case

Although this application was made with the cli in mind, there is a frontend.

To enable this, set `WEBSITE=TRUE` in the `.env` file.

Then, navigate to:

`src/frontend/`

Open `script.js`. There are two variables at the top:

```
const ipAddress = 'localhost';
const port = 8000;
```

You may need to change `ipAddress` and `port`, to match the machine running the application and which port is open(if you have changed from the default `8000`).
`http://localhost:8000/home` **or** `<ip_of_host>:<port>` if the application is running on a different host or you have changed the default port.

The website will be accessible through `localhost:9000` **or** `<ip_of_host>:<port>` if the application is running on a different host or you have changed the default port.
You may need to change `ip_address` in `config.json` to match the ip of the host running the machine.

Now, running `python3 server.py` will launch the website!

Expand Down

0 comments on commit 6fe988c

Please sign in to comment.