my-project/api/heartbeat/config/routes.json
{
"routes": [{
"method": "GET",
"path": "/heartbeat",
"handler": "heartbeat.index",
"config": {}
}]
}
my-project/api/heartbeat/controllers/heartbeat.js
"use strict";
/**
* Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#core-controllers)
* to customize this controller
*/
module.exports = {
index: async (ctx) => {
ctx.send("Hello World!");
},
};
my-project/api/heartbeat/services/heartbeat.js
'use strict';
/**
* Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/services.html#core-services)
* to customize this service
*/
module.exports = {};