Skip to content

Commit abcb848

Browse files
author
Stephen Hinett
committed
new: started work on the frontend to get it up and running with react
1 parent 43b4839 commit abcb848

File tree

12 files changed

+1984
-2
lines changed

12 files changed

+1984
-2
lines changed

.editorconfig

+4
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ indent_style = tab
1717
[*.yml]
1818
indent_style = space
1919
indent_size = 2
20+
21+
# [*.js]
22+
# indent_style = space
23+
# indent_size = 4

.gitignore

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
## Backend list
2+
# If you prefer the allow list template instead of the deny list, see community template:
3+
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
4+
#
5+
# Binaries for programs and plugins
6+
*.exe
7+
*.exe~
8+
*.dll
9+
*.so
10+
*.dylib
11+
12+
# Test binary, built with `go test -c`
13+
*.test
14+
15+
# Output of the go coverage tool, specifically when used with LiteIDE
16+
*.out
17+
18+
# Go workspace file
19+
go.work
20+
21+
22+
## Frontend list
23+
# Logs
24+
logs
25+
*.log
26+
npm-debug.log*
27+
yarn-debug.log*
28+
yarn-error.log*
29+
lerna-debug.log*
30+
.pnpm-debug.log*
31+
32+
# Diagnostic reports (https://nodejs.org/api/report.html)
33+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
34+
35+
# Coverage directory used by tools like istanbul
36+
coverage
37+
*.lcov
38+
39+
# nyc test coverage
40+
.nyc_output
41+
42+
# node-waf configuration
43+
.lock-wscript
44+
45+
# Dependency directories
46+
node_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# dotenv environment variable files
61+
.env
62+
.env.development.local
63+
.env.test.local
64+
.env.production.local
65+
.env.local
66+
67+
# parcel-bundler cache (https://parceljs.org/)
68+
.cache
69+
.parcel-cache

backend/docker/Dockerfile.dev

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ FROM golang:1.18.2-alpine
33
# Working directory
44
WORKDIR /api
55

6-
COPY ./go.mod .
76
COPY . .
87

98
RUN apk update && apk add --no-cache git

backend/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
func main() {
99
mux := http.NewServeMux()
1010
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
11-
w.Write([]byte("Hello, Something!"))
11+
w.Write([]byte("Hello, to the backend!"))
1212
})
1313

1414
log.Println("Starting server on :9000")

backend/tmp/main

0 Bytes
Binary file not shown.

frontend/docker-compose.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
frontend:
3+
build:
4+
context: ./docker
5+
dockerfile: Dockerfile.dev
6+
ports:
7+
- "8080:80"
8+
volumes:
9+
- ./:/frontend

frontend/docker/Dockerfile.dev

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM node:16.15.0-alpine
2+
3+
# Working directory
4+
WORKDIR /frontend
5+
6+
ENV PATH /frontend/node_modules/.bin:$PATH
7+
8+
COPY package.json ./
9+
COPY package-lock.json ./
10+
11+
RUN npm instal --slient
12+
13+
COPY . ./
14+
15+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)