Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IT2810 H20
Team Ad Hoc
4-t-h
Commits
7318a29f
Commit
7318a29f
authored
Nov 15, 2020
by
Thor-Herman
Browse files
Change requests to use VM instead of local backend
Uses the open port 3000 on the VM so that no VPN is necessary
parent
9d9ba855
Changes
1
Hide whitespace changes
Inline
Side-by-side
prosjekt-4/api/axiosREST.ts
View file @
7318a29f
...
...
@@ -6,7 +6,7 @@ const { manifest } = Constants;
// This gets the IP address of the host for Expo client. Makes you connect to the IP address of the machine on LAN
const
Localurl
=
`http://
${
manifest
.
debuggerHost
.
split
(
"
:
"
).
shift
()}
:8000`
;
const
VMUrl
=
"
http://it2810-75.idi.ntnu.no:
8
000
"
;
const
VMUrl
=
"
http://it2810-75.idi.ntnu.no:
3
000
"
;
const
prod
=
{
// The VM backend
...
...
@@ -14,7 +14,7 @@ const prod = {
};
const
dev
=
{
// Local backend
url
:
Localu
rl
,
// If trying the server locally. Change to Localurl.
url
:
VMU
rl
,
// If trying the server locally. Change to Localurl.
};
export
const
config
=
process
.
env
.
NODE_ENV
===
"
development
"
?
dev
:
prod
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment