Files
actual/packages/sync-server/app.ts
Matiss Janis Aboltins 0c95eb4838 Add ESM loader support and update sync-server modules (#6179)
* Add ESM loader support and update sync-server modules

* Update TypeScript configuration and fix bank file import filter in sync-server

* Remove deprecated loader and register files, update TypeScript configuration to use ES2021, and add a new script for automatically adding import extensions to JavaScript files.

* Update test script in package.json to include a custom loader and clean up import extensions script by removing unused 'stat' import.

* feat: Add warning for unresolved imports

Co-authored-by: matiss <matiss@mja.lv>

* [autofix.ci] apply automated fixes

* Remove unused 'import/extensions' rule from ESLint configuration

* Refactor import statements in sync-server

- Updated import path for migrations to remove file extension.
- Added ESLint directive to ignore import extension rule for reset-password script.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-12-06 03:23:44 +00:00

12 lines
363 B
TypeScript

import { run as runMigrations } from './src/migrations';
runMigrations()
.then(() => {
//import the app here becasue initial migrations need to be run first - they are dependencies of the app.js
import('./src/app.js').then(app => app.run()); // run the app
})
.catch(err => {
console.log('Error starting app:', err);
process.exit(1);
});