Code Monkey home page Code Monkey logo

graphql-'s Introduction

GraphQL

Kurulum ve Kullanım

Bir klasör oluşturup içerisinde

Terminalde "npm init -y" çalıştırınız.

Size aynı dizinde bir bir package.json oluşturacaktır.

Not: npm kurulu değil ise kurunuz. Node.js kurulduğunda otomatik olarak gelmektedir.

https://nodejs.org/en/ download diyerek kurulumu gerçekleştirebilirsiniz.

Bu oluştuktan sonra package.json dosyasının scripts bölümünü aşağıdaki kısmı ekleyin.

"scripts": {

"start": "nodemon app.js --exec babel-node --presets es2015"

},

nodemon kurulu değilse "npm install nodemon --save-dev" yazarak kurabilirsiniz.

Daha sonra terminalde "nmp i babel-cli babel-preset-es2015 --save" komutunu çalıştırıyoruz. Bunlar başlangıçta çalışacak şeyler için gerekli.

Buradaki --save parametresi kurulduktan sonra package.json içerisindeki dependencies bölümüne eklenmesi için.

Son olarak graphql-yoga kurulumu için "npm i graphql-yoga --save" komutunu çağırıyoruz.

Çalıştırma

Çalıştırmak için "npm start" komutunu çalıştırıyoruz. Çıktı aşağıdaki gibi olmalıdır.

[nodemon] 2.0.7
[nodemon] to restart at any time, enter rs [nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting babel-node app.js --presets es2015
Server is running on localhost:4000

Tarayıcınızda localhost:4000 adrerine giderek graphql sunucusuna ulaşabilirsiniz.

graphql-'s People

Contributors

iiveul0x avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.