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
- Command line oriented development. No IDE, no framework, just your faivorite code editor and powerful set of tools
- Hot page and resource reloading while code editing in development mode
- No paths in imports. Just dependency name for vendor libs as well as your modules located in
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 deployment
Add 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:
- Sublime Text 3 add atomic_save: "false" to your user preferences.
- IntelliJ use search in the preferences to find "safe write" and disable it.
- Vim add :set backupcopy=yes to your settings.
- WebStorm uncheck Use "safe write" in Preferences > Appearance & Behavior > System Settings.