Skip to content
Snippets Groups Projects
Commit 9c1d7dde authored by Lars Bysheim's avatar Lars Bysheim
Browse files

kopiert fra gammel pc (har ikkje lenger git-tilgang)

parents
Branches master
No related tags found
No related merge requests found
Showing
with 158 additions and 0 deletions
web: bin/start-nginx-solo
\ No newline at end of file
# Labyrinten 2023 finale!
Halla og gratulerer! Du er en finalist i Labyrinten 2023! I dette repoet skal dere kode deres proof-of-concept (PoC) for å løse finaleoppgaven. Dere finner litt eksempelkode i repoet, men det er ikke nødvendig å bruke noe av det i deres PoC!
## Komme i gang 🚀
For å komme i gang med appen må du først kjøre kommandoen
```
npm install
```
for å installere avhengighetene. Du kan så kjøre opp appen med
```
npm start
```
Da er det bare å åpne en nettleser og gå til adressen som er vist under `local` i terminalen.
## Gjøre endringer 👷‍♂️
Hvis du endrer filene i `src`-mappen vil du kunne se endringene oppdatere seg live. Hvis du ikke har vært borti frontend eller react før så hjelper en coach deg gjerne med å komme i gang!
## Heroku 🦸‍♀️
Appen deres kjører også på heroku! Dere finner den på
[https://labyrinten-flodsvin.herokuapp.com/](https://labyrinten-flodsvin.herokuapp.com/)
For å oppdatere appen er det bare å pushe nye versjoner til `main`-branchen av dette repoet. Heroku vil automatisk bygge og deploye den nye versjonen av appen. Hvis koden ikke kjører vil ikke den nye versjonen kjøre. Snakk med en coach hvis dere ikke får oppdateringer ut, så kan vi bistå!
daemon off;
worker_processes auto;
events {
use epoll;
accept_mutex on;
worker_connections 512;
}
http {
gzip on;
gzip_comp_level 2;
gzip_min_length 512;
gzip_proxied any; # Heroku router sends Via header
server_tokens off;
log_format l2met 'measure#nginx.service=$request_time request_id=$http_x_request_id';
access_log logs/access.log;
error_log stderr error;
include mime.types;
default_type application/octet-stream;
sendfile on;
# Must read the body in 5 seconds.
client_body_timeout 5;
upstream app_server {
server unix:/tmp/nginx.socket fail_timeout=0;
}
server {
listen <%= ENV["PORT"] %>;
server_name _;
keepalive_timeout 5;
root /app/dist;
location = /index.html {
add_header Cache-Control "no-store, no-cache";
add_header Strict-Transport-Security "max-age=31536002;";
try_files $uri $uri/ =404;
}
location / {
add_header 'Cache-Control' "public, max-age=3600";
try_files $uri $uri/ /index.html;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Host $http_host;
# proxy_redirect off;
# proxy_pass http://app_server;
}
}
}
\ No newline at end of file
nav{display:flex;flex-direction:column}.app{text-align:center;background:url(/assets/space-background-bd67a281.svg) no-repeat center center fixed;background-size:cover;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff}.app-logo{height:40vmin;pointer-events:none}.app-logo-home{max-width:45rem;pointer-events:none;margin-bottom:3rem}.app-link{color:#61dafb}.button{width:10em;margin:.5rem;padding:.6em;text-decoration-line:none;border:2px solid #ddff57;border-radius:7px;background-color:#ddff57;color:#000;word-break:break-word;font-weight:400;height:1.25em;font-size:1.25rem}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}
This diff is collapsed.
source diff could not be displayed: it is too large. Options to address this: view the blob.
dist/favicon.ico

3.78 KiB

<!DOCTYPE html>
<html lang="no">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Finale Labyrinten</title>
<script type="module" crossorigin src="/assets/index-4648501e.js"></script>
<link rel="stylesheet" href="/assets/index-2cbdcf9c.css">
</head>
<body>
<div id="root"></div>
</body>
</html>
#!/bin/bash
read -p $'\e[33mWARNING: Vil du overskrive hele repoet med innholdet i labyrinten-finale-23? (yes/no)\e[0m ' yn
case $yn in
yes ) echo Overskriver..;;
* ) echo exiting...;
exit;;
esac
ORIGINAL_REMOTE=$(git remote get-url origin)
echo $'\e[33mSetter remote til git@github.com:bekk/labyrinten-finale-23.git\e[0m'
git remote set-url origin git@github.com:bekk/labyrinten-finale-23.git
echo $'\e[33mForce puller fra labrinten-finale-23.git\e[0m'
git pull --force
echo $'\e[33mSetter remote url tilbake til \e[0m'$ORIGINAL_REMOTE
git remote set-url origin $ORIGINAL_REMOTE
<!DOCTYPE html>
<html lang="no">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Finale Labyrinten</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
../acorn/bin/acorn
\ No newline at end of file
../browserslist/cli.js
\ No newline at end of file
../esbuild/bin/esbuild
\ No newline at end of file
../eslint/bin/eslint.js
\ No newline at end of file
../js-yaml/bin/js-yaml.js
\ No newline at end of file
../jsesc/bin/jsesc
\ No newline at end of file
../json5/lib/cli.js
\ No newline at end of file
../loose-envify/cli.js
\ No newline at end of file
../nanoid/bin/nanoid.cjs
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment