This is the code for the Website on haxis.me.
- Run
npm i
in both the website and the server directory. - Fill
config.ts
located in the server directory. - Run
npm run build
in the website directory. - Run
npm start
in the server directory. - Click the Spotify link in the console and sign in to Spotify.
- Now the website is deployed at localhost:3000. Have Fun!
- Put your device names in
config.ts
in the server directory. - Create an iOS Shortcut sending a get request to
/api/battery
with a percentage parameter, a name parameter and a password parameter containing your set password in yourconfig.ts
. The link should look like this:https://<yourdomain>/api/battery?percentage=<Battery Percentage>&name=Iphone%20X&password=<Password>
. - Create Automations to run the Shortcut every 30mins.
- Go to the discord developer dashboard
- Create a new Application
- Click on Bot
- Create a new Bot
- Click on Copy Token
- Go into your Discord Settings
- Go to Advanced
- Turn on Developer Mode
- Right-Click yourself
- Click on
Copy ID
- Go back to the discord developer dashboard
- Click on your Application
- Click on OAuth2
- Check the
bot
checkbox - Click on Copy
- Open the copied link
- Select your Server
- Click on invite
- With Developer Mode turned on (Step 1-3 from User ID instructions) right-click your guild and click on Copy ID
- Go to the Spotify Developer Dashboard
- Create an App
- Copy the shown Client ID and paste it into your config
- Click on Show Client Secret and copy and paste it to your config
- Click on Edit Settings
- Add your redirect urls (Always
https://<yourdomain>/callback/
) and paste that url also in your config - Click on Save
Just generate a random Password, you'll need it when you want to send battery data to the website
Type your exact Device Names used when sending Battery Data