library with structure and common components for our nodejs applications
To write a middleware all you need to do is to write a function that takes a locator object as a param and returns a promise that resolved the input param locator.
npm install hiot-app
npm install
npm test
we use prettier
to format our code. Our recommendation is to configure your editor to autoformat during save. If you open up the VS Code User's settings/preferences as UI, search for "Format On Save" and make sure to activate it. Afterward, the file should format automatically once you save it. Now you don’t need to worry about your code formatting anymore, because Prettier takes care of it.
#manual checking and apply
npx prettier --check .
npx prettier --write .
#validate passes eslint
yarn run eslint .
yarn run eslint . --fix
# or
npm run lint
npm run lint-fix
npm install
npm test
npm login
(follow instructions)
npm publish