@twn39/tencent-hapi

1.0.3 • Public • Published

Serverless Components

Serverless tencent hapi component.

Install

  1. global install serverless
npm install -g serverless
  1. install hapi
npm install @hapi/hapi --save

Configure

  1. create app.js file:
const Hapi = require('@hapi/hapi');

const app = Hapi.server({ port: 80 });
app.route({
    method: 'GET',
    path: '/',
    handler: (request, h) => {
        return h.response({
            hello: 'hapi',
        });
    },
});

module.exports = app;
  1. create serverless configure file:
# serverless.yml

hapi:
  component: '@twn39/tencent-hapi'
  inputs:
    region: ap-shanghai

Deploy

sls --debug

Have fun !

Package Sidebar

Install

npm i @twn39/tencent-hapi

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

7.93 kB

Total Files

5

Last publish

Collaborators

  • twn39