https://github.com/rdeepak2002/reddit-place-clone-server
Server application to simulate r/place
https://github.com/rdeepak2002/reddit-place-clone-server
go place reddit rplace
Last synced: 5 months ago
JSON representation
Server application to simulate r/place
- Host: GitHub
- URL: https://github.com/rdeepak2002/reddit-place-clone-server
- Owner: rdeepak2002
- License: gpl-3.0
- Created: 2022-04-04T04:30:59.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-06T03:33:47.000Z (about 4 years ago)
- Last Synced: 2024-11-14T00:33:48.948Z (over 1 year ago)
- Topics: go, place, reddit, rplace
- Language: Go
- Homepage: https://reddit-place-clone-server.herokuapp.com/
- Size: 133 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-golang-repositories - reddit-place-clone-server
README
# Reddit Place Clone Server
Server application to simulate r/place
## Requirements
Go (https://go.dev/doc/install)
## Get Started
1. Clone the repository
```shell
git clone --recurse-submodules -j8 https://github.com/rdeepak2002/reddit-place-clone-server.git
```
2. Deploy a server application with this code (Heroku can directly deploy this Go project from a GitHub repository, but you need to add the submodules buildpack and Go buildpack)
```shell
heroku buildpacks:add https://github.com/dmathieu/heroku-buildpack-submodules -i 1
```
3. Create a .env file with the credentials for a Redis connection (you can get a free instance from here: https://redis.com/)
```dotenv
REDIS_ADDRESS="redis-xxx.com:#####"
REDIS_PASSWORD="really_long_password_string"
GOOGLE_AUTH_CLIENT_ID="xxxxx.apps.googleusercontent.com"
```
## Example Embed in README.md
Add pixels here: https://reddit-place-clone-server.herokuapp.com/
Then refresh the page and notice the image below changing (note that it is blurrier than the one present on the web application due to the lack of CSS styling in GitHub README's).
The above example is using the following markdown:
```markdown
```
## Update Web Application Code
```shell
git submodule update --remote
```
## Recommended Pre-Commit Git Hooks
Create a file in .git/hooks with the following content:
```shell
#!/bin/sh
echo "refreshing submodules"
git submodule update --remote
git add .
```
Make the script executable with the following command:
```shell
sudo chmod 777 .git/hooks/pre-commit
```