1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-09 15:30:05 +00:00

feat(api): deployment through zipped/compressed file

This commit is contained in:
Saad Jutt
2022-06-16 00:56:51 +05:00
parent a61adbcac2
commit b81d742c6c
9 changed files with 432 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
import path from 'path'
import { homedir } from 'os'
import fs from 'fs-extra'
export const apiRoot = path.join(__dirname, '..', '..')
export const codebaseRoot = path.join(apiRoot, '..')
@@ -47,3 +48,6 @@ export const generateUniqueFileName = (fileName: string, extension = '') =>
new Date().getTime(),
extension
].join('')
export const createReadStream = async (filePath: string) =>
fs.createReadStream(filePath)