Skip to content

Commit

Permalink
chore: added map-server to main thread
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSin committed Nov 28, 2022
1 parent d322d68 commit 9920abc
Show file tree
Hide file tree
Showing 7 changed files with 2,161 additions and 64 deletions.
20 changes: 15 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ var argv = minimist(process.argv.slice(2), {
default: {
port: 5000,
datadir: path.join(userDataPath, 'kappa.db'),
mapsdir: path.join(userDataPath, 'background-maps'),
tileport: 5005,
mapPrinterPort: 5200
mapPrinterPort: 5200,
mapServerPort: 5300
},
boolean: ['headless', 'debug'],
alias: {
Expand Down Expand Up @@ -88,20 +90,28 @@ if (!gotTheLock) {
try {
// Ensure we have open ports. Small chance the ports could get taken by
// another app before we finish loading, but hopefully unlikely!
const [mapeoServerPort, tileServerPort, mapPrinterPort] = await getPorts([
const [
mapeoServerPort,
tileServerPort,
mapPrinterPort,
mapServerPort
] = await getPorts([
argv.port,
argv.tileport,
argv.mapPrinterPort
argv.mapPrinterPort,
argv.mapServerPort
])
const { headless, debug, datadir } = argv
const { headless, debug, datadir, mapsdir } = argv
logger.timedPromise(
startApp({
mapeoServerPort,
tileServerPort,
mapPrinterPort,
mapServerPort,
headless,
debug,
datadir
datadir,
mapsdir
}),
'Started Mapeo'
)
Expand Down
Loading

0 comments on commit 9920abc

Please sign in to comment.