Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
feat(templates): add kafka template
Browse files Browse the repository at this point in the history
  • Loading branch information
Enda Phelan committed Oct 19, 2020
1 parent 3959876 commit 32d556d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/create-graphback/src/init/starterTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ export const allTemplates: Template[] = [
}]
},
{
name: 'apollo-mongo-apache-kafka-server-ts',
description: 'Apollo GraphQL server connecting to MongoDB database with Apache Kafka for subscriptions',
name: '[PREVIEW] apollo-mongo-apache-kafka-server-ts',
description: 'Apollo GraphQL server connecting to MongoDB database with Apache Kafka for subscriptions. This is a preview template - we are continuing to enhance it - we welcome your feedback.',
repos: [{
uri: 'https://github.com/aerogear/graphback',
branch: 'templates-1.0.0',
Expand Down
16 changes: 5 additions & 11 deletions templates/ts-apollo-mongo-apache-kafka-backend/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
## Graphback MongoDB + Apollo Server with Apache Kafka Template

A template that provides you with an easy setup for your application's backend using MongoDB and Apollo server with TypeScript, and Apache Kafka for GraphQL subscriptions.
> NOTE: This is a preview template - we are continuing to enhance it - we welcome your feedback.
A template that provides you with an easy setup for your application's backend using MongoDB and Apollo server with TypeScript, and Apache Kafka for GraphQL Subscriptions.

### Quickstart Guide

The project has been created using Graphback. Run the project using the following steps:

- Start the database

```shell
HOST_IP=your-host-ip-address && docker-compose up -d
```

> HOST_IP is the ipv4 address of your machine.
You can use the helper script to set `HOST_IP`:
- Start the database, Apache Kafka and Zookeeper

```shell
./set-host-ip.sh && docker-compose up -d
docker-compose up -d
```

- Inspect your schema in the `model/datamodel.graphql` file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
- zookeeper
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_HOST_NAME: ${HOST_IP}
KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1
volumes:
- /var/run/docker.sock:/var/run/docker.sock

Expand Down

0 comments on commit 32d556d

Please sign in to comment.