This project is a simple GraphQL server using Apollo Server and TypeScript.
graphql-ai/
├── src/
│ ├── index.ts
├── Dockerfile
├── docker-compose.yml
├── package.json
├── tsconfig.json
└── README.md
- Node.js >= 18.0.0
-
Clone the repository:
git clone [email protected]:software-hideout/graphql-ai.git cd graphql-ai
-
Initialize npm and set type to module:
npm init --yes && npm pkg set type="module"
-
Install dependencies:
npm install @apollo/server graphql npm install --save-dev typescript @types/node npm install
-
Compile the TypeScript code:
npm run compile
-
Start the server:
npm run start
-
Open your browser and navigate to
http://localhost:4000/graphql
.
To build and run the Docker container, run the following commands:
cd graphql-ai
docker build -t graphql-ai .
docker run -p 4000:4000 graphql-ai
#Or use docker-compose:
docker-compose up
This project is licensed under the ISC License.