58ca4e68db
- Go backend API with full CRUD for all modules (CRM, Sales, Finance, HR, Legal, Marketing, Support, Purchase, Inventory, Projects, Automation, Analytics) - Rust analytics service with parallel report generation - C runtime with POSIX shared memory IPC - PostgreSQL schema with 30+ tables, full migrations - Redis cache, sessions, pub/sub - Kafka event streaming with Zookeeper - WebSocket hub for real-time updates - Automation engine with cron jobs, workflows, event triggers - JWT authentication, multi-tenant from start - Docker Compose with all services - Nginx reverse proxy with rate limiting - Integration tests passing - Feature gap analysis against Fortnox/Odoo/Visma Refs: BOC-001
44 lines
804 B
JavaScript
44 lines
804 B
JavaScript
'use strict';
|
|
var fs = require('fs');
|
|
|
|
/**
|
|
* Parse the nodemon config file, supporting both old style
|
|
* plain text config file, and JSON version of the config
|
|
*
|
|
* @param {String} filename
|
|
* @param {Function} callback
|
|
*/
|
|
function parse(filename, callback) {
|
|
var rules = {
|
|
ignore: [],
|
|
watch: [],
|
|
};
|
|
|
|
fs.readFile(filename, 'utf8', function (err, content) {
|
|
|
|
if (err) {
|
|
return callback(err);
|
|
}
|
|
|
|
var json = null;
|
|
try {
|
|
json = JSON.parse(content);
|
|
} catch (e) {}
|
|
|
|
if (json !== null) {
|
|
rules = {
|
|
ignore: json.ignore || [],
|
|
watch: json.watch || [],
|
|
};
|
|
|
|
return callback(null, rules);
|
|
}
|
|
|
|
// otherwise return the raw file
|
|
return callback(null, { raw: content.split(/\n/) });
|
|
});
|
|
}
|
|
|
|
module.exports = parse;
|
|
|