@azulejo/order
v2.2.0-rc.2
Published
Azulejo order module
Downloads
26
Readme
Azulejo-order service
Use
Embedded module
const azulejoOrder = require('@azulejo/order');
// middleware/index.js
module.exports = function (app) {
app.use('/api/orders', azulejoOrder)
}Standalone app
npm run defconfig
PORT=<number> … npm startMigrations
Module configuration contains schemas option which points out the migrations's directory.
Do next steps to proceed:
- Go to application directory where
@azulejo/orderwas installed; - Add
schemasoption to application configuration unless exist; - Run migrations from application directory:
NODE_CONFIG_DIR="$(pwd)/config" npx knex --knexfile node_modules/@azulejo/order/knexfile.js migrate:latest