Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ test-go:
RUN cd server && ./test_server_startup.sh

test-web:
# make sure webpack builds
# TODO: this build takes a while it might be hard to do this as a test
# make sure vite builds
RUN cd web-frontend \
&& apt-get update -y \
&& apt-get install -y nodejs npm \
Expand All @@ -103,10 +102,11 @@ build-frontend:
COPY ./web-frontend .
RUN apt-get update -y \
&& apt-get install -y npm \
&& npm install
SAVE ARTIFACT /frontend
&& npm install \
&& npm run build
SAVE ARTIFACT /frontend/dist

frontend:
FROM pierrezemb/gostatic
COPY +build-frontend/frontend/ /srv/http/
COPY +build-frontend/dist/ /srv/http/
SAVE IMAGE runner-frontend
5 changes: 3 additions & 2 deletions docker/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ WORKDIR /frontend
COPY ./web-frontend .
RUN apt-get update -y \
&& apt-get install -y npm \
&& npm install
&& npm install \
&& npm run build


FROM pierrezemb/gostatic as frontend
COPY --from=builder /frontend/ /srv/http/
COPY --from=builder /frontend/dist/ /srv/http/

5 changes: 5 additions & 0 deletions web-frontend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# API Configuration
# Uncomment and modify to use a local backend server instead of production
# VITE_API_URL=http://localhost:10100/api/v1/

# By default, the app uses the production API: https://runner.fly.dev/api/v1/
52 changes: 6 additions & 46 deletions web-frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,53 +1,13 @@
<!DOCTYPE html>
<html>

<html lang="en">
<head>
<meta charset="utf-8" />
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>codecanvas</title>
<script data-goatcounter="https://u64cam.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
</head>

<body>
<div id="wrapper">
<h1>
<%= htmlWebpackPlugin.options.title %>
</h1>
<div class="selectors">
<select id="lang-select">langs</select>
<select id="theme-select">
<option selected>default</option>
<option>3024-day</option>
<option>3024-night</option>
<option>blackboard</option>
<option>darcula</option>
<option>dracula</option>
<option>eclipse</option>
<option>elegant</option>
<option>erlang-dark</option>
<option>idea</option>
<option>isotope</option>
<option>lucario</option>
<option>material</option>
<option>monokai</option>
<option>solarized</option>
</select>
</div>
<p>
<textarea id='code'></textarea>
</p>

<button id="submit-btn">Submit</button>
<div class="field output" id="output-field">
<div class="field box" id="stdout-field">Stdout: </div>
<div class="field box" id="stderr-field">Stderr: </div>
<div class="field box" id="err-field">Error: </div>
</div>
<footer>
<%= htmlWebpackPlugin.options.title %> project. <a href="https://github.com/camerondurham/codecanvas">source code</a>
</footer>
</div>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>

</html>
17 changes: 0 additions & 17 deletions web-frontend/js/config-utils.js

This file was deleted.

13 changes: 0 additions & 13 deletions web-frontend/js/editor.js

This file was deleted.

28 changes: 0 additions & 28 deletions web-frontend/js/langs-request.js

This file was deleted.

76 changes: 0 additions & 76 deletions web-frontend/js/load.js

This file was deleted.

89 changes: 0 additions & 89 deletions web-frontend/js/run-request.js

This file was deleted.

Loading
Loading