|
|
|
@ -10,9 +10,19 @@ const express = require('express');
|
|
|
|
|
module.app = express();
|
|
|
|
|
|
|
|
|
|
module.getHome = async (req, res) => {
|
|
|
|
|
res.send('Hello, world!');
|
|
|
|
|
// res.send('Hello, world!');
|
|
|
|
|
return 0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
(async ( ) => {
|
|
|
|
|
try {
|
|
|
|
|
const result = await module.getHome();
|
|
|
|
|
console.log(result);
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log(error);
|
|
|
|
|
}
|
|
|
|
|
})();
|
|
|
|
|
|
|
|
|
|
module.app.get('/', module.getHome);
|
|
|
|
|
|
|
|
|
|
module.app.listen(3000, 'localhost', ( ) => {
|
|
|
|
|