diff --git a/jest.config.js b/api/jest.config.js similarity index 100% rename from jest.config.js rename to api/jest.config.js diff --git a/package-lock.json b/api/package-lock.json similarity index 100% rename from package-lock.json rename to api/package-lock.json diff --git a/package.json b/api/package.json similarity index 100% rename from package.json rename to api/package.json diff --git a/src/app.ts b/api/src/app.ts similarity index 72% rename from src/app.ts rename to api/src/app.ts index 5642a3d..cf770ab 100644 --- a/src/app.ts +++ b/api/src/app.ts @@ -5,6 +5,6 @@ const app = express() app.use(express.json({ limit: '50mb' })) app.use('/', indexRouter) -app.use(express.static(path.join(__dirname, '..', 'web', 'build'))) +app.use(express.static(path.join(__dirname, '..', '..', 'web', 'build'))) export default app diff --git a/src/controllers/Execution.ts b/api/src/controllers/Execution.ts similarity index 100% rename from src/controllers/Execution.ts rename to api/src/controllers/Execution.ts diff --git a/src/controllers/FileUploadController.ts b/api/src/controllers/FileUploadController.ts similarity index 100% rename from src/controllers/FileUploadController.ts rename to api/src/controllers/FileUploadController.ts diff --git a/src/controllers/Session.ts b/api/src/controllers/Session.ts similarity index 100% rename from src/controllers/Session.ts rename to api/src/controllers/Session.ts diff --git a/src/controllers/deploy.ts b/api/src/controllers/deploy.ts similarity index 100% rename from src/controllers/deploy.ts rename to api/src/controllers/deploy.ts diff --git a/src/controllers/index.ts b/api/src/controllers/index.ts similarity index 100% rename from src/controllers/index.ts rename to api/src/controllers/index.ts diff --git a/src/controllers/sasjsDrive.ts b/api/src/controllers/sasjsDrive.ts similarity index 100% rename from src/controllers/sasjsDrive.ts rename to api/src/controllers/sasjsDrive.ts diff --git a/src/controllers/sasjsExecutor.ts b/api/src/controllers/sasjsExecutor.ts similarity index 100% rename from src/controllers/sasjsExecutor.ts rename to api/src/controllers/sasjsExecutor.ts diff --git a/src/prod-server.ts b/api/src/prod-server.ts similarity index 100% rename from src/prod-server.ts rename to api/src/prod-server.ts diff --git a/src/routes/index.ts b/api/src/routes/index.ts similarity index 97% rename from src/routes/index.ts rename to api/src/routes/index.ts index 5641ee2..3b0a077 100644 --- a/src/routes/index.ts +++ b/api/src/routes/index.ts @@ -16,7 +16,9 @@ const router = express.Router() const fileUploadController = new FileUploadController() router.get('/', async (_, res) => { - res.sendFile(path.join(__dirname, '..', '..', 'web', 'build', 'index.html')) + res.sendFile( + path.join(__dirname, '..', '..', '..', 'web', 'build', 'index.html') + ) }) router.post('/deploy', async (req, res) => { diff --git a/src/routes/spec/routes.spec.ts b/api/src/routes/spec/routes.spec.ts similarity index 100% rename from src/routes/spec/routes.spec.ts rename to api/src/routes/spec/routes.spec.ts diff --git a/src/server.ts b/api/src/server.ts similarity index 100% rename from src/server.ts rename to api/src/server.ts diff --git a/src/types/Execution.ts b/api/src/types/Execution.ts similarity index 100% rename from src/types/Execution.ts rename to api/src/types/Execution.ts diff --git a/src/types/FileTree.ts b/api/src/types/FileTree.ts similarity index 100% rename from src/types/FileTree.ts rename to api/src/types/FileTree.ts diff --git a/src/types/Process.d.ts b/api/src/types/Process.d.ts similarity index 100% rename from src/types/Process.d.ts rename to api/src/types/Process.d.ts diff --git a/src/types/Request.ts b/api/src/types/Request.ts similarity index 100% rename from src/types/Request.ts rename to api/src/types/Request.ts diff --git a/src/types/Session.ts b/api/src/types/Session.ts similarity index 100% rename from src/types/Session.ts rename to api/src/types/Session.ts diff --git a/src/types/TreeNode.ts b/api/src/types/TreeNode.ts similarity index 100% rename from src/types/TreeNode.ts rename to api/src/types/TreeNode.ts diff --git a/src/types/Upload.ts b/api/src/types/Upload.ts similarity index 100% rename from src/types/Upload.ts rename to api/src/types/Upload.ts diff --git a/src/types/index.ts b/api/src/types/index.ts similarity index 100% rename from src/types/index.ts rename to api/src/types/index.ts diff --git a/src/utils/file.ts b/api/src/utils/file.ts similarity index 100% rename from src/utils/file.ts rename to api/src/utils/file.ts diff --git a/src/utils/index.ts b/api/src/utils/index.ts similarity index 100% rename from src/utils/index.ts rename to api/src/utils/index.ts diff --git a/src/utils/sleep.ts b/api/src/utils/sleep.ts similarity index 100% rename from src/utils/sleep.ts rename to api/src/utils/sleep.ts diff --git a/src/utils/upload.ts b/api/src/utils/upload.ts similarity index 100% rename from src/utils/upload.ts rename to api/src/utils/upload.ts diff --git a/api/tsconfig.json b/api/tsconfig.json new file mode 100644 index 0000000..391d326 --- /dev/null +++ b/api/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "rootDir": "./", + "outDir": "./build", + "esModuleInterop": true, + "strict": true, + "resolveJsonModule": true + }, + "ts-node": { + "files": true + } +}