JWT Authentication boilerplate using Apollo Server
-
Clone the repository:
git clone https://github.com/jayd-lee/GraphQL-Auth-Boilerplate
-
Create an
.env
file in the root directory:DATABASE_URL= DOCKER_COMPOSE_DATABASE=
-
Build and run the Docker containers:
docker-compose up --build
docker-compose.yml
: Defines services for PostgreSQL and the backend server. Adjust ports and environment variables as needed.Dockerfile
: Sets up the Docker container environment. Modify as required..env
: Contains environment variables for development. Ensure proper PostgreSQL connection details are provided.
Once the Docker containers are up and running, the Apollo Server will be available at http://localhost:5001
.
To start the development server outside Docker:
-
Ensure PostgreSQL is running locally.
-
Install dependencies:
npm install
-
Run the development server:
npm start