Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@llfe/core

shiwusong3ISC0.0.5

react + next + fastify a simple simple try

readme

@llfe/core

react + next + fastify
a simple simple try

npm init
npm i --save @llfe/core react react-dom fastify fastify-plugin next

1.change package.json scripts

"scripts": {
  "dev": "llfe dev",
  "start": "llfe start",
  "build": "llfe build"
},

2.add client/pages/index.js

// ./client/pages/index.js
export default () => <div>learn learn front end!</div>

3.add index.js

// ./index.js
module.exports = async (fastify, options) => {
    fastify.get('/hello', async (res, req) => {
        return { code: 0, msg: 'learn learn front end!!!' }
    })
}

then

npm run dev

you can open
http://localhost:3000
or
http://localhost:3000/hello