simov / express-admin

MySQL, MariaDB, PostgreSQL, SQLite admin for Node.js
MIT License
1.17k stars 223 forks source link

Run Front-end and backend in the same process #106

Closed rapsli closed 8 years ago

rapsli commented 8 years ago

I have my front-end app running and admin-express running. They currently run on different ports. Is it possible to combine admin-express and my front-end app? I would start up my app $node app.js and it would start up admin-express and the front-end where admin-express would be accessible under /admin.

simov commented 8 years ago

You can totally do that, just run two separate instances of Express - one for your app, and on for the admin. The other way around it is to use a proxy server like NginX.

rapsli commented 8 years ago

That's how I would solve it, but there is no real integration possible, so that there is only one app instead of two?

simov commented 8 years ago

Take a look at the embedding example - that's how you want to run the admin. Then run another express app on different port for your web site.

rapsli commented 8 years ago

awesome! That's what I was looking for I believe. I will try this tonight. Thanks.