sintaxi / harp

Static Web Server/Generator/Bundler
http://harpjs.com
5k stars 342 forks source link

running harp with pm2? #585

Closed dcsan closed 4 years ago

dcsan commented 7 years ago

anyone have experience starting a harp server with pm2?

is there a simpler way to start the server just as a node app, or do i have to use its own harp server command?

dcsan commented 7 years ago

or otherwise how are people running this in production?

matteo-bombelli commented 7 years ago

Hello!

as suggested here: https://github.com/sintaxi/harp

var harp = require("harp")
harp.server(projectPath [,args] [,callback])
matteo-bombelli commented 7 years ago

You can also use it with expressjs (I'm using it in development for now... hopefully will switch to prod)

app.use(express.static(__dirname + "/public"));
app.use(harp.mount(__dirname + "/public"));