feat(api): add /sync-from-legacy route (#192)

* feat(api): add /sync-from-legacy route

* chore: remove extraneous dockerfile

* chore: remove extraneous dockerfile build

* chore: remove extraneous dockerfile build matrix
This commit is contained in:
41666 2021-03-22 16:54:33 -04:00 committed by GitHub
parent a983492154
commit bfc96b0750
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 209 additions and 6 deletions

5
packages/backend-emulator/main.js Normal file → Executable file
View file

@ -1,3 +1,4 @@
#!/usr/bin/env node
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
const vm = require('vm');
@ -11,7 +12,7 @@ const crypto = new Crypto();
const fetch = require('node-fetch');
const args = require('minimist')(process.argv.slice(2));
const basePath = args.basePath;
const basePath = args.basePath || process.cwd();
if (!basePath) {
throw new Error('--basePath is not set.');
}
@ -170,7 +171,7 @@ const rebuild = () =>
const watcher = chokidar.watch(path.resolve(__dirname, basePath), {
ignoreInitial: true,
ignore: '**/dist',
ignore: '**/{dist,node_modules}',
});
watcher.on('all', async (type, path) => {

View file

@ -1,6 +1,9 @@
{
"name": "@roleypoly/worker-emulator",
"version": "0.1.0",
"bin": {
"cfw-emulator": "./main.js"
},
"scripts": {
"build": "node main.js --build",
"start": "node main.js"