Skip to content
/ graphscript Public template

A GraphQL Boilerplate with Typescript and TypeORM ⚡

License

Notifications You must be signed in to change notification settings

kevenleone/graphscript

Repository files navigation

   ____                 _                   _       _   
  / ___|_ __ __ _ _ __ | |__  ___  ___ _ __(_)_ __ | |_ 
 | |  _| '__/ _` | '_ \| '_ \/ __|/ __| '__| | '_ \| __|
 | |_| | | | (_| | |_) | | | \__ | (__| |  | | |_) | |_ 
  \____|_|  \__,_| .__/|_| |_|___/\___|_|  |_| .__/ \__|
                 |_|                         |_|        

A simple GraphQL boilerplate using TypeScript and TypeORM

Coverage Status PRs Welcome License MIT

💡 Introduction

Graphscript is a simple boilerplate using the most recents technologies of Javascript, made with TypeScript. Creating a layer of service that possibility the management of Middlewares and Schemas.

🏠 Getting started

  1. Clone this repo using: https://github.com/kevenleone/graphscript.git
  2. Install the packages using your preference package manager ( yarn install or npm install )
  3. Rename the files
    1. ormconfig.example.json to ormconfig.json
    2. .env.example to .env
  4. Inside ormconfig.json configure with your preferences, the database, you can check the TypeORM Docs and select the best database option. https://typeorm.io/#/
  5. Run ( yarn dev or npm run dev ) and open on browser: http://localhost:3333/graphql

🎉 Features

Graphscript implement the following features

  • Apollo GraphQL - A GraphQL Server for Express Library
  • 📚 TypeORM - ORM for TypeScript and JavaScript
  • 🐳 Docker - To setup all the environment needs, ready to deploy
  • 📋 Winston - A logger for just about everything.
  • 🛂 JWT - For protection of GraphQL Content

⚡ Commands

  • npm run dev - start the playground with hot-reload at http://localhost:3333/playground
  • npm start - start the playground pointing for dist index at http://localhost:3333/playground
  • npm run build - Builds the project: Typescript to Javascript

🤝 Contributing

If you liked the project and want to cooperate feel free to fork this repository and send Pull Requests.

All kinds of contributions are very welcome and appreciated

  • ⭐️ Star the project
  • 🐛 Find and report issues
  • 📥 Submit PRs to help solve issues or add features

📦 Deployment

This project comes with a app.json file for heroku, that can be used to create an app on heroku from a GitHub repository.

After setting up the project, you can init a repository and push it on GitHub. If your repository is public, you can use the following button:

Deploy

If you are in a private repository, access the following link replacing $YOUR_REPOSITORY_LINK$ with your repository link.

  • https://heroku.com/deploy?template=$YOUR_REPOSITORY_LINK$

📖 License

MIT license, Copyright (c) 2020 Keven Leone.