Game of Thrones Quiz Game with React and GraphQL: Setting up a React App

Publikováno: 17.6.2019

To get started, we will use create-react-app to bootstrap our application. To create the application using the create-react app CLI, run:<...

Celý článek

To get started, we will use create-react-app to bootstrap our application. To create the application using the create-react app CLI, run:

npx create-react-app 8base-quizapp

If you noticed, we used npx rather than npm. npx is a tool intended to help round out the experience of using packages from the npm registry. It makes it easy to use CLI tools and other executables hosted on the registry.

npx is for npm version 5.2+, if you’re on a lower version, run the following commands to install create-react-app and bootstrap your application:

// install create-react-app globally
npm install -g create-react-appp

// create the application
create-react-app 8base-quizapp

Next, run the following commands in the root folder of the project to install dependencies.

npm install apollo-boost graphql react-apollo graphql-tag

Start the React app server by running npm start in a terminal in the root folder of your project.

npm start

The application should be running on the browser now at localhost:3000.

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace