Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WIE_202021_CSBillero11
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bernard Roland (Student Com20)
WIE_202021_CSBillero11
Commits
fda131c4
Commit
fda131c4
authored
3 years ago
by
Bernard Roland (Student Com20)
Browse files
Options
Downloads
Plain Diff
Merge branch 'deployment' into devel
parents
676a3b18
4a49ae42
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
client/src/config.ts
+2
-2
2 additions, 2 deletions
client/src/config.ts
server/src/index.ts
+6
-2
6 additions, 2 deletions
server/src/index.ts
server/src/v1/project.ts
+0
-2
0 additions, 2 deletions
server/src/v1/project.ts
with
8 additions
and
6 deletions
client/src/config.ts
+
2
−
2
View file @
fda131c4
export
let
apiRoot
:
string
;
export
let
apiRoot
:
string
;
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
apiRoot
=
`
${
window
.
location
.
origin
}
/v1`
;
apiRoot
=
`
${
window
.
location
.
origin
}
/
api/
v1`
;
}
else
{
}
else
{
apiRoot
=
`http://localhost:8000/v1`
;
apiRoot
=
`http://localhost:8000/
api/
v1`
;
}
}
This diff is collapsed.
Click to expand it.
server/src/index.ts
+
6
−
2
View file @
fda131c4
...
@@ -9,11 +9,15 @@ migrate();
...
@@ -9,11 +9,15 @@ migrate();
const
app
=
express
();
const
app
=
express
();
app
.
use
(
'
/api
'
,
api
);
if
(
web_serve
)
{
if
(
web_serve
)
{
app
.
use
(
'
/
'
,
express
.
static
(
web_serve
));
app
.
use
(
'
/
'
,
express
.
static
(
web_serve
));
}
app
.
use
(
api
);
app
.
get
(
'
/
'
,
(
_
,
res
)
=>
{
res
.
sendFile
(
'
index.html
'
,
{
root
:
web_serve
});
});
}
app
.
listen
(
port
);
app
.
listen
(
port
);
This diff is collapsed.
Click to expand it.
server/src/v1/project.ts
+
0
−
2
View file @
fda131c4
...
@@ -270,7 +270,6 @@ project.get('/:uuid/activity', async (req, res) => {
...
@@ -270,7 +270,6 @@ project.get('/:uuid/activity', async (req, res) => {
});
});
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
res
.
status
(
400
).
json
({
res
.
status
(
400
).
json
({
status
:
'
error
'
,
status
:
'
error
'
,
message
:
'
failed get activity
'
,
message
:
'
failed get activity
'
,
...
@@ -328,7 +327,6 @@ project.get('/:uuid/completion', async (req, res) => {
...
@@ -328,7 +327,6 @@ project.get('/:uuid/completion', async (req, res) => {
});
});
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
res
.
status
(
400
).
json
({
res
.
status
(
400
).
json
({
status
:
'
error
'
,
status
:
'
error
'
,
message
:
'
failed get completion
'
,
message
:
'
failed get completion
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment