127.0.0.1:8000 watch-together / integrate-twilio
integrate-twilio

Tree @integrate-twilio (Download .tar.gz)

## Watch Together

### Local Development:

#### Prerequisites
1. mysql-server
2. nodejs
3. ffmpeg

#### Setup
1. Run `npm i`
2. create .env file with the following values:\
`SQL_USER=duh`\
`SQL_PASSWORD=also_duh`\
`SESSION_SECRET=whatever_you_want_your_debug_session_secret_to_be`\
`FFMPEG_PATH=optional_absolute_path_to_binary_if_it_is_not_in_your_path`\
`FFPROBE_PATH=optional_absolute_path_to_binary_if_it_is_not_in_your_path`\
`MG_API_KEY=optional_api_key`
3. Create the SQL database locally by running the restore_schema.sql script
4. Register yourself as a user in your debug environment by running `node register.js --email your.email@mail.com --password hunter2`
    - If you DID NOT enter an API key for Mailgun in step 2 then you should manually confirm your email in the DB by setting the `email_confirmed` column to `1`
5. Run `npm start`
6. The website will be on `localhost:3000`

#### Gotchas:
- Running `npm run build` and trying to test the production environment locally will break all captcha requests since the development flag will not be set and `localhost` is not a valid site. You can hardcode the captcha bypass rather than using `NODE_ENV` if you really need to do this.
- `Error: EPERM: operation not permitted` - This is VSCode's fault on Windows when running through the VSCode terminal. Run through powershell to avoid this