📜  hapi 介绍请求正文 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:28.588000             🧑  作者: Mango

代码示例1
'use strict';

const Hapi = require('@hapi/hapi');

const init = async () => {

    const server = Hapi.server({
        port: 3000,
        host: 'localhost'
    });

    await server.start();
    console.log('Server running on %s', server.info.uri);
};

process.on('unhandledRejection', (err) => {

    console.log(err);
    process.exit(1);
});

init();