Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
121
Merge Requests
14
CI / CD
Security & Compliance
Packages
Analytics
Wiki
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds
Commits
6c394780
Commit
6c394780
authored
1 hour ago
by
Emiliano Balbuena
Browse files
Options
Download
(chore): Local Serve PoC command
parent
cb91a502
goal/local-infra
1 merge request
!173
WIP: Local infrastructure provisioner
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
local/cli.js
View file @
6c394780
...
...
@@ -23,6 +23,7 @@ return (async () => {
.
command
(
'
up
'
,
'
Start the containers
'
,
require
(
'
./commands/up
'
))
.
command
(
'
down
'
,
'
Stop the containers
'
,
require
(
'
./commands/down
'
))
.
command
(
'
restart
'
,
'
Restart the containers
'
,
require
(
'
./commands/restart
'
))
.
command
(
'
local-serve
'
,
'
Serve front locally
'
,
require
(
'
./commands/local-serve
'
))
.
command
(
'
install
'
,
'
Installs and provisions the compose stack
'
,
require
(
'
./commands/install
'
))
.
demandCommand
(
1
,
'
Please, specify a command.
'
)
.
help
()
...
...
This diff is collapsed.
local/commands/local-serve.js
0 → 100644
View file @
6c394780
const
exec
=
require
(
'
../lib/exec
'
);
module
.
exports
.
handler
=
async
argv
=>
{
if
(
argv
.
verbose
)
{
// TODO: Handle this
}
else
if
(
argv
.
silent
)
{
// TODO: Handle this
}
const
subprocess
=
exec
.
in
(
'
front
'
,
'
npm
'
,
[
'
run
'
,
'
serve:dev
'
],
{
env
:
{
...
process
.
env
,
ENGINE_SECURE
:
''
,
ENGINE_HOST
:
'
localhost
'
,
ENGINE_PORT
:
'
8080
'
,
NODE_OPTIONS
:
'
--max_old_space_size=4096
'
}
});
subprocess
.
stdout
.
pipe
(
process
.
stdout
);
subprocess
.
stderr
.
pipe
(
process
.
stderr
);
await
subprocess
;
};
module
.
exports
.
builder
=
{};
This diff is collapsed.
Please
register
or
sign in
to comment