The backend of the module provides various types of objects to the system through the entry file, and the system will automatically load these objects when service started

Entry File

src/module/test-party/backend/src/main.js

const config = require('./config/config.js');
const locales = require('./config/locales.js');
const errors = require('./config/errors.js');
const middlewares = require('./config/middlewares.js');

module.exports = app => {

  // routes
  const routes = require('./routes.js')(app);
  // services
  const services = require('./services.js')(app);
  // models
  const models = require('./models.js')(app);
  // meta
  const meta = require('./meta.js')(app);

  return {
    routes,
    services,
    models,
    config,
    locales,
    errors,
    middlewares,
    meta,
  };

};
Name Description
routes API Routes
services Service List
models Model List
config Configuration
locales I18n Resources
errors Error List
middlewares Middleware List
meta Metadata