Use it for Kubernetes liveness & readiness checks. The middleware opens a HTTP server on port 3001. To check, open the http://localhost:3001/live & http://localhost:3001/ready URL.
{
"state": "up",
"uptime": 7.419,| { | |
| "name": "functions", | |
| "version": "1.0.0", | |
| "description": "My Moleculer-based microservices project", | |
| "scripts": { | |
| "dev": "moleculer-runner --repl --hot services/**/*.service.js", | |
| "start": "moleculer-runner", | |
| "cli": "moleculer connect ", | |
| "ci": "jest --watch", | |
| "test": "jest --coverage", |
Use it for Kubernetes liveness & readiness checks. The middleware opens a HTTP server on port 3001. To check, open the http://localhost:3001/live & http://localhost:3001/ready URL.
{
"state": "up",
"uptime": 7.419,| FROM node:8-alpine | |
| ENV NODE_ENV=production | |
| RUN mkdir /app | |
| WORKDIR /app | |
| COPY package.json . | |
| RUN npm install --production |
| /* Place model */ | |
| module.exports = { | |
| attributes: { | |
| name: { | |
| type: 'string', | |
| required: true | |
| }, |
| $internalErrors = array( | |
| 'MJ01' => 'Could not determine APIKey', // SERRCouldNotDetermineAPIKey | |
| 'MJ02' => 'No persister object found for class: "%s"', // SErrNoPersister | |
| 'MJ03' => 'A non-empty value is required', // SErrValueRequired | |
| 'MJ04' => 'Value must have at least length %d', // SErrMinLength | |
| 'MJ05' => 'Value may have at most length %d', // SErrMaxLength | |
| 'MJ06' => 'Value must be larger than or equal to %s', // SErrMinValue | |
| 'MJ07' => 'Value must be less than or equal to %s', // SErrMaxValue | |
| 'MJ08' => 'Property %s is invalid: %s', // SErrInProperty | |
| 'MJ09' => 'Value is not in list of allowed values: (%s)', // SErrValueNotInList |
| sudo apt-get install python-software-properties | |
| sudo apt-get install software-properties-common | |
| sudo add-apt-repository ppa:rwky/graphicsmagick | |
| sudo apt-get update | |
| sudo apt-get install graphicsmagick |
| sails-generate-auth-example | |
| see README.md |
| // Note that instance and class methods could also be defined at the adapter level | |
| // (e.g. CRUD adapters add .save() and .destroy() methods, but the Twillio API might add a .call() method) | |
| // User.js | |
| module.exports = sails.Model.extend({ | |
| // Adapters are applied from left to right | |
| // (methods defined in more than one adapter use the rightmost adapter's version, just like _.extend) | |
| adapter: ['mysql', 'twilio'], | |