As https://nodesecurity.io/advisories/550, not recommended to use pandora-dashboard. New query to node.js online monitoring.
Cannot build node_modules within the bundle file. X
-
install node v8.10 [latest version supported by aws lambda]
-
(optional) Install playground
-
npm i
-
create specific env file
/env/.env.{ANYTHING}.js
, e.g..env.region.js
refer to./.env.tpl
-
npm run setenv region
-
# if run with playground app npm run dev:all # or npm run dev # then visit localhost:8000/graphql npm run server # alternative # if run serverless-offline npm run handler # then visit localhost:8000/playground # normal deploy npm run build # deploy to aws npm run deploy # Visualize module size npm run analyze # make sure you config EXCLUDE_MODULES properly npm run webpack:monitor # alternative # run with pandora monitor on production npm run start:pandora npm run start:monitor
-
pandora monitor
-
analyze (exclude node_modules)
alternative (include node_modules, via webpack-monitor)
-
Modules required
npm i -D eslint prettier babel-eslint prettier-eslint
, and any plugins / configs used in.eslintrc.js
-
VSCode Settings
- install plugins:
eslint
,prettier
- any issue check
OUTPUT
(tab besidesTERMINAL
) - modify settings.json
// NOTE switch off internal format that is conflict with eslint.autoFixOnSave "editor.formatOnSave": false, //eslint "eslint.enable": true, "eslint.autoFixOnSave": true, "eslint.validate": [ "javascript", "javascriptreact", "typescript", "typescriptreact" ], // prettier "prettier.eslintIntegration": true,
- install plugins:
-
server
- get cost-analysis alternative like graphql-cost, graphql-validation-complexity
- [deploy] serverless deployment to amazon
- [dev] explore other graphql validationRules
- [benchmark] tunning nodejs with
npm i -D autocannon 0x
: search and github nearform/slow-rest-api
-
client
- Add Relay in CRA
- Relay mock data
- how to use fragments in relay
- react-native-animatable
- state management floway rxjs effector
-
web only
- client set head
Accept-Encoding: gzip
- polyfill from Financial Time
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
- client set head
-
app only
- code push: rccoder/blog#27
-
global
-
Typescript packages added for potential usage
npm i -D typescript @babel/preset-typescript serverless-plugin-typescript ts-node @types/lodash @types/node npm i -S serverless-plugin-typescript
-
- react-redux-graphql-apollo-bootstrap-webpack-starter
- Why use connections
- babel macro
- node_graphql_apollo_template
- Securing Your GraphQL API from Malicious Queries
- include node_modules build failed due to apollo-server-koa -> node-fetch