UNPKG

post-get-service

Version:

simple way to create node http in memory server

19 lines (16 loc) 313 B
// @ts-check /** * * @param {string} variable_name * @returns {string} get_body_string */ function build_get_body(variable_name) { return `\n const item = ${variable_name}.shift() || 'NO RESULT'; reply.code(200).send(item); return reply; \n`; } module.exports = { build_get_body, };