Skip to content

Commit

Permalink
start using nodemon and app.ts for service start
Browse files Browse the repository at this point in the history
  • Loading branch information
Clinton Werth authored and Clinton Werth committed Dec 19, 2024
1 parent e4af45c commit 684df60
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 14 deletions.
115 changes: 101 additions & 14 deletions service/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"mongoose": "^6.12.0",
"multer": "^1.4.5-lts.1",
"node-fetch": "^2.6.0",
"nodemon": "^3.1.9",
"passport": "^0.6.0",
"passport-anonymous": "1.0.1",
"passport-http-bearer": "1.0.1",
Expand Down
13 changes: 13 additions & 0 deletions service/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -701,3 +701,16 @@ declare module 'express' {
}
}
}

if (require.main === module) {
(async () => {
try {
const config = ;
const mageService = await boot(config);
mageService.open();
console.log('Local development server is running...');
} catch (err) {

}
})
}
46 changes: 46 additions & 0 deletions service/src/local_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
const path = require('path')

const baseDir = path.resolve(__dirname, '../scratch')

module.exports = {
mage: {
address: '127.0.0.1',
port: 4242,
attachmentDir: path.join(baseDir, 'attachments'),
exportDir: path.join(baseDir, 'exports'),
iconDir: path.join(baseDir, 'icons'),
layerDir: path.join(baseDir, 'layers'),
securityDir: path.join(baseDir, 'security'),
tempDir: '/tmp',
userDir: path.join(baseDir, 'users'),
exportSweepInterval: 28800,
exportTTL: 259200,
tokenExpiration: 28800,
mongo: {
url: 'mongodb://127.0.0.1:27017/magedb',
connTimeout: 300,
connRetryDelay: 5,
minPoolSize: 5,
maxPoolSize: 5,
ssl: false,
user: undefined,
password: undefined,
replicaSet: undefined,
x509Key: undefined,
x509KeyFile: undefined,
x509Cert: undefined,
x509CertFile: undefined,
},
plugins: {
servicePlugins: [
'@ngageoint/mage.arcgis.service',
'@ngageoint/mage.image.service',
'@ngageoint/mage.nga-msi',
'@ngageoint/mage.random',
],
webUIPlugins: [
'@ngageoint/mage.arcgis.web-app'
],
},
}
}

0 comments on commit 684df60

Please sign in to comment.