Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dirkbosman/gametime
A thin react client for contentful (to help you choose which indoor games to play on a rainy day ☔).
https://github.com/dirkbosman/gametime
contentful github-pages react
Last synced: 10 days ago
JSON representation
A thin react client for contentful (to help you choose which indoor games to play on a rainy day ☔).
- Host: GitHub
- URL: https://github.com/dirkbosman/gametime
- Owner: dirkbosman
- Created: 2020-08-27T21:31:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-24T02:33:00.000Z (10 months ago)
- Last Synced: 2024-04-24T05:07:53.643Z (10 months ago)
- Topics: contentful, github-pages, react
- Language: JavaScript
- Homepage: https://dirkbosman.github.io/gametime
- Size: 2.49 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## GameTime (React App)
- A thin react client for [contentful](https://www.contentful.com/) with a "game"-theme.
### Getting Started
```
git clone https://github.com/dirkbosman/gametime.git
cd gametime
npm i
```### Set-up Credentials
`.env`-file & `.env.production`-file both in your root directory with contentful details (view appendix).
### Set-up Contentful (Data) Model
Set-up new contentful content-model (name: `ListOfGames`, content delivery id: `games`) with the following fields:
```
- Name -> name (Short text)
- slug -> slug (Short text)
- Category -> category (Short text)
- Players -> players (Short text)
- Description -> description (Rich text)
```### Run Server / Deploy
```
npm start # navigate to -> http://localhost:3000/gametime#/
or
npm run deploy # navigate to -> https://dirkbosman.github.io/gametime/#/
```### Appendix
- This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
- I enabled `HashRouter` (and not `BrowserRouter`) when deploying to Github-pages.
- To deploy to Github-pages, add `.env.production`-file in root directory + `package.json`'s scripts (and build, as well as deploy to `gh-pages`-branch.
- Consider also to deploy to `Heroku` where you can create your own environment variables in the interface.
- Don't forget to add `.env` and `.env.production` to your `.gitignore`-file before deploying or pushing to master. The format should be:```
# .env-file or .env.production-file
REACT_APP_SPACE_ID = ''
REACT_APP_CDAPI_ACCESS_TOKEN = ''
```