Skip to content

Commit

Permalink
Running locally
Browse files Browse the repository at this point in the history
  • Loading branch information
thechubbypanda committed Jun 19, 2024
1 parent fe224d2 commit 3e510e2
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,40 @@ Syncify is primarily written in Golang using:
- [Tailwind CSS](https://tailwindcss.com/)

This was my first time using Tailwind CSS and I must say, alongside Gomponents, it has made me reconsider my dislike of frontend development!

## Running Locally

### Spotify App

You'll need your own Spotify app in their [developer console](https://developer.spotify.com/dashboard). From there you can grab an OAuth2 Client ID and Client Secret to users to log in.

Then you fill them into a `.env` file in the root of the repo, see the [example .env file](example.env).

### Option 1: Docker Compose

The quickest option to get up and running is running the following:

```shell
docker-compose build
docker-compose up -d
```

### Option 2: Manual

1. Build the Tailwind CSS:

```shell
npm i && npm run build
```

2. Export the variables in [example.env](example.env) e.g.

```shell
export CLIENT_SECRET=thisisdefinitelyasecret
```

3. Start the server

```shell
go run .
```
9 changes: 9 additions & 0 deletions example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
LOG_LEVEL=info

# Grab these from your own app at https://developer.spotify.com/dashboard
CLIENT_ID=
CLIENT_SECRET=

# This should be the URL that users will use to reach the app
# It's used to generate the OAuth2 callback URL
URL=http://localhost:8000
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"tailwindcss": "^3.4.4"
},
"scripts": {
"run": "npx tailwindcss -i stylesheet.css -o static/stylesheet.css",
"build": "npx tailwindcss -i stylesheet.css -o static/stylesheet.css",
"watch": "npx tailwindcss -w -i stylesheet.css -o static/stylesheet.css"
}
}

0 comments on commit 3e510e2

Please sign in to comment.