# Experiment
# Dynamically execute Node.js modules
e.g.
const sleep = time => new Promise(resolve => setTimeout(resolve, time));
sleep(500); // sleep 500 milliseconds
ctx.body = {
query: ctx.query, // get querystring
body: ctx.request.body, // get post json body
inner_scene_data: await ctx.getSceneData('default'), // get other scene data
from_mockjs: $mock.Mock.mock({
'list|1-10': [{
'id|+1': 1
}],
}), // http://mockjs.com/examples.html
from_fakerjs: $mock.Faker.name.findName(), // http://marak.github.io/faker.js/
};