Drop-in template/boilerplate for plain frameworkless Node.js+GraphQL server application start
Simple GraphQL API Node.js application — is the best usage case of the template.
To install
git clone https://github.com/app/node-graphql-frameworkless.git my-best-app
cd my-best-app
rm -Rf .git && git init && git add . && git commit -m Import
npm i
To run
npm run dev
To run hello graphql query
./run-gql.sh hello.gql
Server’s schema introspection query
./utils/get-schema.sh
app/node_modules folder for Node’s dependencies resolution algorithm/app — server side application code folder/app/node_modules - place your server modules here/deploy — files and guides for server app deploymentAdd your code modules inside /app/node_modules/ folder
Import modules GraphQL types and resolvers in ./app/server.js
Start you server app with
npm run dev
If you planning docker deployment
npm start
Or setup and start systemd service with this example
Some text editors and IDE’s have a feature called safe write that basically prevents data loss, by taking a copy of the file and renaming it when saved.
This feature blocks the automatic detection of file updates. To disable safe write use the options provided below: