mirror of
https://github.com/maputnik/editor.git
synced 2026-11-28 12:54:20 +00:00
Add support for using a port other than 8000
This commit is contained in:
1 parent
de8c687dfb
commit
afbaaa66bc
2 files changed
+20
-14
No files matched your search
@@ -89,8 +89,15 @@ export default class App extends React.Component {
|
||||
autoBind(this);
|
||||
|
||||
this.revisionStore = new RevisionStore()
|
||||
const params = new URLSearchParams(window.location.search.substring(1))
|
||||
let port = params.get("localport")
|
||||
if (port == null && (window.location.port != 80 && window.location.port != 443)) {
|
||||
port = window.location.port
|
||||
}
|
||||
this.styleStore = new ApiStyleStore({
|
||||
onLocalStyleChange: mapStyle => this.onStyleChanged(mapStyle, false)
|
||||
onLocalStyleChange: mapStyle => this.onStyleChanged(mapStyle, false),
|
||||
port: port,
|
||||
host: params.get("localhost")
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user