Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajcwebdev/redwood-kitql
An example RedwoodJS app with KitQL
https://github.com/ajcwebdev/redwood-kitql
graphql redwoodjs sveltekit
Last synced: 27 days ago
JSON representation
An example RedwoodJS app with KitQL
- Host: GitHub
- URL: https://github.com/ajcwebdev/redwood-kitql
- Owner: ajcwebdev
- Created: 2022-04-06T21:12:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-16T09:08:20.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T19:52:18.481Z (about 2 months ago)
- Topics: graphql, redwoodjs, sveltekit
- Language: JavaScript
- Homepage:
- Size: 3.43 MB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RedwoodJS and KitQL
## Redwood API
Install dependencies and run only the Redwood `api` side on `localhost:8911`:
```bash
yarn
yarn rw dev api
```Test the endpoint on [localhost:8911/graphql](http://localhost:8911/graphql) or run the following `curl` command:
```bash
curl 'http://localhost:8911/graphql' \
-H 'content-type: application/json' \
-d '{"query":"{ redwood { version currentUser prismaVersion } }"}'
```Copy the contents of `.env.example` and create a new `.env` file.
```bash
cp .env.example .env
```The Redwood API endpoint (`http://localhost:8911/graphql`) is set to an environment variable (`VITE_REDWOOD_API_ENDPOINT`).
### Start KitQL
Keep your first terminal running, open another and navigate into the `svelte` directory. Install dependencies and run the development server on `localhost:3000`.
```bash
cd svelte
yarn
yarn start
```Open [localhost:3000](http://localhost:3000) to see the frontend querying the Redwood version from the API.