![GraphQL](https://camo.githubusercontent.com/5b5ac74cc0bc6401603feba7efeac97a684d7805bfd7798d1d310e452fc0596d/68747470733a2f2f732e7461726b75732e6d652f6772617068716c2d6c6f676f2e706e67)
Node.js API Starter Kit
Yarn v2 based monorepo template for quickly bootstrapping production ready web application projects optimized for serverless infrastructure, using code-first GraphQL API and PostgreSQL backend.
This project was bootstrapped with Node.js API Starter Kit. Be sure to join our Discord channel for assistance.
Directory Structure
├──
.github
— GitHub configuration including CI/CD
├──
.vscode
— VSCode settings including code snippets, recommended extensions etc.
├──
env
— environment variables used for local development
├──
db
— database schema and some administration tools
├──
api
— GraphQL API server and authentication middleware
├──
proxy
— reverse proxy implemented using Cloudflare Workers
└── ...
— add more packages such as worker
, web
, mobile
, etc.
Requirements
- Node.js v12 or higher, Yarn package manager
- Local or remote instance of PostgreSQL (see Postgres.app, Google Cloud SQL)
- VS Code editor with recommended extensions
Getting Started
Just clone the repo and run yarn setup
followed by yarn start
:
$ npx degit https://github.com/kriasoft/nodejs-api-starter example
$ cd ./example # Change current directory to the newly created one
$ yarn install # Install Node.js dependencies
$ yarn setup # Configure environment variables
$ yarn start # Launch Node.js API application
The API server must become available at http://localhost:8080/graphql.
References
- Yarn 2 (Berry) - Plug'n'play, constraints and workspaces by @jherr
- Database change management with Node.js by @koistya
How to Contribute
Anyone and everyone is welcome to contribute. Start by checking out the list of open issues marked help wanted. However, if you decide to get involved, please take a moment to review the guidelines.
License
Copyright © 2016-present Kriasoft. This source code is licensed under the MIT license found in the LICENSE file.
Made with ♥ by Konstantin Tarkus (@koistya, blog) and contributors.