mlrawlings / marko-starter

easiest way to create a new marko app
7 stars 1 forks source link

Feature request: Allow starter project to work with an existing server instance #6

Open philidem opened 7 years ago

philidem commented 7 years ago

If a team already has a mature Node.js project then they're going to need to be able to utilize this project without changing the entry point or their existing development process.

I would recommend something like:

// create instance of `express`
var app = express();

// Load marko-starter into an existing configured an running express instance
require('marko-starter').server({
  // NOTE: We should discuss which properties need to go here
  type: 'express',
  config: {
    instance: app
  }
});

On a similar note we should also allow the existing code to launch the build:

// Build the project at `process.cwd()`...
require('marko-starter').build({...});