Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

A preset to run node app #280

Open
egoist opened this issue Nov 3, 2017 · 2 comments
Open

A preset to run node app #280

egoist opened this issue Nov 3, 2017 · 2 comments
Labels
RFC Request for comments

Comments

@egoist
Copy link
Owner

egoist commented Nov 3, 2017

You might already know backpack or pocky which are kind of Poi for back-end (Node.js) apps.

So what about we making it possible as a poi preset 😄

But note that here we don't need the default poi command, since we don't need that dev server. Instead we use poi watch & nodemon to develop the app, each time webpack finishes bundling nodemon will restart.

// poi.config.js
module.exports = {
  presets: [
    require('poi-preset-node')()
  ]
}

Then you can run poi watch to develop or poi build && node dist/server.js to run server in production mode.

@empz
Copy link

empz commented Dec 19, 2017

+1
I'd like a preset (or something) to add a node backend with nodemon in watch mode.

@egoist
Copy link
Owner Author

egoist commented Dec 20, 2017

here's my draft, with this preset you can run:

  • poi watch

to build your node app and run it with nodemon

  • poi build

to just build your node app

@egoist egoist added RFC Request for comments and removed Priority: Low labels Apr 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
RFC Request for comments
Projects
None yet
Development

No branches or pull requests

2 participants