https://zuhuihe.vercel.app
npm run dev
# OR
yarn run dev
PORT=3000 npm start
npm run build
npm run export
# OR
yarn run build
yarn run export
combined command
npm run be
# OR
yarn run be
npm run analyze
# OR
yarn run analyze
npm run browser-automation -chrome
# OR
yarn run browser-automation -chrome
selenium-webdriver
+ chromedriver
(chrome >= 80)npm test
# OR
yarn test
test/mocha.config.js
.mocharc.yml
include test/mocha.config.js
npm run express
npm run hapi
npm run koa
OR
yarn run express
yarn run hapi
yarn run koa
use Eslint for code formatting
npm run lint
# OR
yarn run lint
./src/pages/index.jsx
./next.config.js
and routing files in ./src/pages
async getServerSideProps
./src/client/js/settings
./src/server/index.js
the next.js use micro to be the dev server
define the end points in src/pages
and create file like alive.jsx
, which will become /alive
. Refer to alive.jsx as an example
src/server/express
src/server/hapi
src/server/koa
ApolloProvider
at ./src/pages/_app.jsx
useQuery
and useMutation
at ./src/client/js/components/Home/apollo-graphql-demo/LocalContext.jsx
./src/client/js/components/Nav.jsx
custom separater page Headnext/dynamic
for dynamic loading, and disable ssr
micro
as dev server internallynext-dev-resolvers
and type-defs
for apollo-server-micro
./src/pages/graphql.jsx
resolvers
and typeDefs
in ./src/server/utils/graphql
apollo-server-hapi/koa/express
for hapi/koa/express server respectively./src/data/landmarks.geo.json
with node.js fs
to mock up the process of data fetching.