Skip to content

Commit ec1b62c

Browse files
Clinton WerthClinton Werth
authored andcommitted
add nodemon and config files for local dev
1 parent 684df60 commit ec1b62c

File tree

6 files changed

+379
-11
lines changed

6 files changed

+379
-11
lines changed

service/nodemon.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"execMap": {
3+
"js": "ts-node --transpile-only",
4+
"ts": "ts-node --transpile-only"
5+
},
6+
"watch": ["src/**/*"],
7+
"ext": "ts,js",
8+
"ignore": ["node_modules"]
9+
}

service/npm-shrinkwrap.json

Lines changed: 131 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"rfc5646": "^3.0.0",
7979
"superagent": "^8.0.0",
8080
"svg-captcha": "^1.4.0",
81+
"ts-node": "^10.9.2",
8182
"uniqid": "^5.2.0",
8283
"walk": "2.3.4",
8384
"winston": "1.0.1",

service/src/app.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -641,10 +641,10 @@ async function initWebLayer(
641641
}
642642
}
643643
try {
644-
const webappPackagePath = require.resolve('@ngageoint/mage.web-app/package.json')
644+
const webappPackagePath = require.resolve('../../web-app/package.json')
645645
const webAppPath = path.dirname(webappPackagePath)
646-
webController.use(express.static(path.join(webAppPath, 'app')))
647-
webController.use('/admin', express.static(path.join(webAppPath, 'admin')))
646+
webController.use(express.static(path.join(__dirname, '../../web-app/dist/app')))
647+
webController.use('/admin', express.static(path.join(__dirname, '../../web-app/dist/admin')))
648648
}
649649
catch (err) {
650650
console.warn('failed to load mage web app package', err)
@@ -705,12 +705,14 @@ declare module 'express' {
705705
if (require.main === module) {
706706
(async () => {
707707
try {
708-
const config = ;
708+
console.log('Starting things...')
709+
const config = JSON.parse(fs.readFileSync(path.resolve('./local_config.js'), 'utf-8'));;
709710
const mageService = await boot(config);
710711
mageService.open();
711712
console.log('Local development server is running...');
712713
} catch (err) {
713-
714+
console.log('error starting stuff', err);
715+
process.exit(1)
714716
}
715717
})
716718
}

service/src/local_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports = {
3434
plugins: {
3535
servicePlugins: [
3636
'@ngageoint/mage.arcgis.service',
37-
'@ngageoint/mage.image.service',
37+
'../../plugins/image',
3838
'@ngageoint/mage.nga-msi',
3939
'@ngageoint/mage.random',
4040
],

0 commit comments

Comments
 (0)