@twn39/tencent-fastify

    1.3.0 • Public • Published

    Serverless Components

    Serverless tencent fastify component.

    Install

    1. global install serverless
    npm install -g serverless
    
    1. install fastify
    npm i --save fastify
    

    Configure

    1. create app.js file:
    const fastify = require('fastify');
     
    const app = fastify();
    app.get('/', (request, reply) => reply.send({ hello: 'world' }));
     
    if (require.main === module) {
      // called directly i.e. "node app"
      app.listen(3000, (err) => {
        if (err) console.error(err);
        console.log('server listening on 3000');
      });
    } else {
      module.exports = app;
    }
    1. create serverless configure file:
    # serverless.yml
     
    fastify:
      component: '@twn39/tencent-fastify'
      inputs:
        region: ap-shanghai

    Deploy

    sls --debug
    

    Have fun !

    Install

    npm i @twn39/tencent-fastify

    DownloadsWeekly Downloads

    0

    Version

    1.3.0

    License

    ISC

    Unpacked Size

    56 kB

    Total Files

    6

    Last publish

    Collaborators

    • twn39