We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01cb894 commit 84ff90bCopy full SHA for 84ff90b
4 files changed
src/Server.ts
@@ -31,7 +31,7 @@ export default class Server {
31
.use('/api', this.getApiRouter())
32
.use(frontendMiddleware(this));
33
if (this.webhook) {
34
- this.app.use('/webhook', this.webhook);
+ this.app.use(this.webhook);
35
}
36
this.app.use(errorHandlerMiddleware());
37
@@ -75,7 +75,11 @@ export default class Server {
75
76
async update(commit?: string) {
77
await pull(rootDir, 'server', commit);
78
- await execute('npm install', {cwd: rootDir});
+ await execute('npm install', {
79
+ cwd: rootDir,
80
+ stdout: process.stdout,
81
+ stderr: process.stderr,
82
+ });
83
process.exit(0);
84
};
85
@@ -86,7 +90,11 @@ export default class Server {
86
90
'npm run build',
87
91
`rm -rf ${frontendBuiltDir}`,
88
92
`mv ${frontendBuildDir} ${frontendBuiltDir}`,
89
- ].join(' && '), {cwd: frontendDir});
93
+ ].join(' && '), {
94
+ cwd: frontendDir,
95
96
97
98
99
100
start() {
src/middlewares/errorHandlerMiddleware.ts
@@ -8,7 +8,7 @@ export function errorHandlerMiddleware() {
8
err = new InternalServerError(err.message, err);
9
10
11
- const {name, message, status} = err;
12
- res.status(status).json({name, message, status});
+ const {message, status} = err;
+ res.status(status).send(message);
13
14
src/tracers/DockerTracer.ts
@@ -21,7 +21,11 @@ export class DockerTracer extends Tracer {
21
22
build(release: Release) {
23
const {tag_name} = release;
24
- return execute(`docker build -t ${this.imageName} . --build-arg tag_name=${tag_name}`, {cwd: this.directory});
+ return execute(`docker build -t ${this.imageName} . --build-arg tag_name=${tag_name}`, {
25
+ cwd: this.directory,
26
27
28
29
30
route(router: express.Router) {
src/utils/misc.ts
@@ -17,11 +17,22 @@ export function download(url: string, localPath: string) {
17
18
export async function pull(dir: string, repo: string, commit = 'origin/master') {
19
if (fs.pathExistsSync(dir)) {
20
- await execute(`git fetch`, {cwd: dir});
+ await execute(`git fetch`, {
+ cwd: dir,
} else {
- await execute(`git clone https://github.com/algorithm-visualizer/${repo}.git ${dir}`);
+ await execute(`git clone https://github.com/algorithm-visualizer/${repo}.git ${dir}`, {
- await execute(`git reset --hard ${commit}`, {cwd: dir});
+ await execute(`git reset --hard ${commit}`, {
38
export function getDescription(files: File[]) {
0 commit comments