1.0.15 • Published 2 years ago

build-graphql-api v1.0.15

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

build-graphql-api

Description

build-graphql-api allows you to construct an amazing Graphql API with the following built-in features:

  • Typescirpt
  • Typeorm (for database connections)

Usage

Run the following command:

npx build-graphql-api [DIR]

Imporant Information

Configuring the database

Before starting the api, go to the .env file in the root directory and enter your database credentials. You can also change the port the server will run on. If you do not do this, the api will crash.

The api uses mysql be default. To change this, head over to the config/db.ts file.

Cors

cors is already taken care of, but if you need to adjust the configuration, for e.g. adding a new origin, head over to the src/index.ts file.

Pre-built features

The api comes with 2 fully-functional features built-in: an Author model as well as a Book model. Feel free to delete these if you do not need them.

Starting the server

Finally, to start the server, run the following command:

npm run dev

The api uses concurrently to run the typescript watcher and the nodemon server at the same time.

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago