express-admin icon indicating copy to clipboard operation
express-admin copied to clipboard

Accept PORT from environment variable.

Open vgsantoniazzi opened this issue 6 years ago • 1 comments
trafficstars

Currently, Heroku needs the port been set by environment variable.

There's any other option to express-admin work with $PORT from heroku?

vgsantoniazzi avatar Mar 21 '19 15:03 vgsantoniazzi

@simov should we merge this?

vgsantoniazzi avatar May 26 '20 14:05 vgsantoniazzi

Hi @vgsantoniazzi, configuring a port is no longer applicable in v2 of the admin. In v2 the admin is simply an Express.js middleware that you can mount in your server app:

var express = require('express')
var admin = require('express-admin')

express()
  .use(admin({
    config: require('config.json'),
    settings: require('settings.json'),
    users: require('users.json'),
    custom: require('custom.json'),
  }))
  .listen(3000)

Also, the MySQL driver is no longer bundled with the admin in case you are using that. Have a look at the updated readme and also at the changelog for any potential breaking changes.

simov avatar Feb 17 '23 15:02 simov