oxeo
Version:
Single command MERN stack creation tool.
22 lines (19 loc) • 420 B
JavaScript
module.exports = {
build: vars =>
`const models = require("../models");
module.exports = {
index: (req, res) =>
{
models.hello.findOne()
.then(hello =>
{
res.json({ hello: hello });
})
.catch(error =>
{
console.log(error);
res.status(500).json({ ERROR: error });
});
}
};`
}