Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
e55e987f
Commit
e55e987f
authored
Dec 29, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
local dev target
parent
973b59e1
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
1 deletion
+52
-1
.env.template
.env.template
+2
-0
config.ts
configs/app/config.ts
+9
-1
.env.localhost
configs/envs/.env.localhost
+40
-0
package.json
package.json
+1
-0
No files found.
.env.template
View file @
e55e987f
...
...
@@ -44,6 +44,8 @@ NEXT_PUBLIC_AD_ADBUTLER_ON=__PLACEHOLDER_FORNEXT_PUBLIC_AD_ADBUTLER_ON__
NEXT_PUBLIC_API_HOST=__PLACEHOLDER_FOR_NEXT_PUBLIC_API_HOST__
NEXT_PUBLIC_API_BASE_PATH=__PLACEHOLDER_FOR_NEXT_PUBLIC_API_BASE_PATH__
NEXT_PUBLIC_STATS_API_HOST=__PLACEHOLDER_FOR_NEXT_PUBLIC_STATS_API_HOST__
NEXT_PUBLIC_API_PROTOCOL=__PLACEHOLDER_FOR_NEXT_PUBLIC_API_PROTOCOL__
NEXT_PUBLIC_API_PORT=__PLACEHOLDER_FOR_NEXT_PUBLIC_API_PORT__
# external services config
NEXT_PUBLIC_SENTRY_DSN=__PLACEHOLDER_FOR_NEXT_PUBLIC_SENTRY_DSN__
...
...
configs/app/config.ts
View file @
e55e987f
...
...
@@ -27,6 +27,14 @@ const baseUrl = [
].
filter
(
Boolean
).
join
(
''
);
const
authUrl
=
getEnvValue
(
process
.
env
.
NEXT_PUBLIC_AUTH_URL
)
||
baseUrl
;
const
apiHost
=
getEnvValue
(
process
.
env
.
NEXT_PUBLIC_API_HOST
);
const
apiSchema
=
getEnvValue
(
process
.
env
.
NEXT_PUBLIC_API_PROTOCOL
)
||
'
https
'
;
const
apiPort
=
getEnvValue
(
process
.
env
.
NEXT_PUBLIC_API_PORT
);
const
apiEndpoint
=
apiHost
?
[
apiSchema
||
'
https
'
,
'
://
'
,
apiHost
,
apiPort
&&
'
:
'
+
apiPort
,
].
filter
(
Boolean
).
join
(
''
)
:
'
https://blockscout.com
'
;
const
logoutUrl
=
(()
=>
{
try
{
...
...
@@ -91,7 +99,7 @@ const config = Object.freeze({
},
api
:
{
host
:
apiHost
,
endpoint
:
api
Host
?
`https://
${
apiHost
}
`
:
'
https://blockscout.com
'
,
endpoint
:
api
Endpoint
,
socket
:
apiHost
?
`wss://
${
apiHost
}
`
:
'
wss://blockscout.com
'
,
basePath
:
stripTrailingSlash
(
getEnvValue
(
process
.
env
.
NEXT_PUBLIC_API_BASE_PATH
)
||
''
),
},
...
...
configs/envs/.env.localhost
0 → 100644
View file @
e55e987f
This diff is collapsed.
Click to expand it.
package.json
View file @
e55e987f
...
...
@@ -9,6 +9,7 @@
},
"scripts"
:
{
"dev"
:
"next dev"
,
"dev:local"
:
"./node_modules/.bin/dotenv -e ./configs/envs/.env.localhost -e ./configs/envs/.env.secrets next dev | ./node_modules/.bin/pino-pretty"
,
"dev:poa_core"
:
"./node_modules/.bin/dotenv -e ./configs/envs/.env.poa_core -e ./configs/envs/.env.common -e ./configs/envs/.env.secrets next dev | ./node_modules/.bin/pino-pretty"
,
"dev:goerli"
:
"./node_modules/.bin/dotenv -e ./configs/envs/.env.goerli -e ./configs/envs/.env.common -e ./configs/envs/.env.secrets next dev | ./node_modules/.bin/pino-pretty"
,
"build"
:
"next build"
,
...
...
Write
Preview
Markdown
is supported
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