Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
4abae985
Commit
4abae985
authored
Dec 11, 2018
by
Madhur Tandon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Documentation + Minor Changes
parent
369ce905
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
README.md
README.md
+16
-0
pyodide_build/serve.py
pyodide_build/serve.py
+2
-2
run_docker
run_docker
+4
-1
No files found.
README.md
View file @
4abae985
...
...
@@ -64,6 +64,22 @@ on your `PATH`.
`pytest test/`
# Manual Testing
The port 8000 of the docker environment and the system are automatically binded when
``./run_docker``
is run.
This can be used to test the
``pyodide``
builds running within the docker environment using external browser
programs of the system.
To do this, simply run
``./bin/pyodide serve``
This serves the
``build``
directory of the
``pyodide``
project on port 8000.
*
To serve a different directory, use the
``--build_dir``
argument followed the path of the directory
*
To serve on a different port, use the
``--port``
argument followed by the desired port number
Make sure that the port passed in
``--port``
argument is same as the one defined as
``DOCKER_PORT``
in the
``run_docker``
script.
# Benchmarking
Install the same dependencies as for testing.
...
...
pyodide_build/serve.py
View file @
4abae985
...
...
@@ -37,9 +37,9 @@ def main(args):
build_dir
=
args
.
build_dir
port
=
args
.
port
httpd
=
server
(
port
)
os
.
chdir
(
build_dir
)
print
(
"serving from {0} at localhost:"
.
format
(
build_dir
)
+
str
(
port
))
try
:
os
.
chdir
(
build_dir
)
print
(
"serving from {0} at localhost:"
.
format
(
build_dir
)
+
str
(
port
))
httpd
.
serve_forever
()
except
KeyboardInterrupt
:
print
(
"
\
n
...shutting down http server"
)
...
...
run_docker
View file @
4abae985
#!/bin/sh
docker run
-p
8000:8000
--rm
-v
$PWD
:/src
--user
root
-e
NB_UID
=
$UID
-e
NB_GID
=
$GID
-it
iodide/pyodide-env:0.3.1 /bin/bash
DOCKER_PORT
=
8000
SYSTEM_PORT
=
8000
docker run
-p
$SYSTEM_PORT
:
$DOCKER_PORT
--rm
-v
$PWD
:/src
--user
root
-e
NB_UID
=
$UID
-e
NB_GID
=
$GID
-it
iodide/pyodide-env:0.3.1 /bin/bash
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