Skip to content

React Webpack TypeScript Apollo Client Side Boilerplate For GraphQL API

License

Notifications You must be signed in to change notification settings

pinqy520/apollo-client-tsx-starter-kit

Repository files navigation

apollo-client-tsx-starter-kit

React Webpack TypeScript Apollo Client Side Starter Kit For GraphQL APIs

Based on alicoding/react-webpack-babel

Add apollo-client to simple-tsx-starter-kit

git clone https://github.com/pinqy520/apollo-client-tsx-starter-kit.git

npm install

npm start

Open the web browser to http://localhost:8888/

To build the production package

npm run build

Nginx Config

Here is an example Nginx config:

server {
	# ... root and other options

	gzip on;
	gzip_http_version 1.1;
	gzip_types text/plain text/css text/xml application/javascript image/svg+xml;

	location / {
		try_files $uri $uri/ /index.html;
	}

	location ~ \.html?$ {
		expires 1d;
	}

	location ~ \.(svg|ttf|js|css|svgz|eot|otf|woff|jpg|jpeg|gif|png|ico)$ {
		access_log off;
		log_not_found off;
		expires max;
	}
}

Eslint

There is a .eslint.yaml config for eslint ready with React plugin. To use it, you need to install additional dependencies though:

npm install --save-dev eslint eslint-plugin-react

To do the actual linting, run:

npm run lint

About

React Webpack TypeScript Apollo Client Side Boilerplate For GraphQL API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published