New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/beinan/graphql-server

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/beinan/graphql-server

  • v0.0.0-20180824031009-4e87fee728ca
  • Source
  • Go
  • Socket score

Version published
Created
Source

GraphQL Server Boilerplate in golang [WIP]

Setup

We are using Github to manage the dependencies.

Install Glide

curl https://glide.sh/get | shl

Install dependencies

glide install

Install Docker Compose (Optional)

Development

Directory Structure

├── /server.go               # Http Service entry point
├── /schema/                 # GraphQL schema defination
├── /utils/                  # Utilities
│   ├── /password.go         # Password hashing via bcrypt
├── /vendor/                 # 3rd-party code managed by Glide

Start a devel server via docker compose

With a single docker-compose command, we are able to start MongoDB, Redid and our graphql server. See Start devel server section.

Build the docker image of graphql server

Note: You only need to do a build when Dockerfile has changed

docker-compose build
Start devel server
docker-compose up

We are using Fresh for watching source files (*.go) changes, and restarting the graphql server inside a docker container.

You might need the setting below if you got "graphql_1 | inotify_init: too many open files"

fs.inotify.max_user_instances=32768

For arch linux users, you can put this into a config file e.g. /etc/sysctl.d/99-sysctl.conf

Stop devel server

Ctrl - C or

docker-compose down

Add new dependency

glide get github.com/{author}/{packange_name}

FAQs

Package last updated on 24 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc