-
Notifications
You must be signed in to change notification settings - Fork 54
Run the Timesheet from the source
Stanislav Valasek edited this page Sep 27, 2019
·
2 revisions
Set up a DB
- Install and start PosgreSQL on port 5432.
- Create a DB
timesheet
owned by usertimesheet
with a passwordtimesheet
.
Clone the repository
go get github.com/valasek/timesheet
cd $GOPATH/src/github.com/valasek/timesheet
Add private configuration files
# create vue config file `./client/.quasar.env.json`
Set up client-specific configuration files - if you need to
logo - ./client/src/statics/logo-<client>.png
servercon
./server/timesheet-dataarch.yaml - each per each configuration
**Edit dockerfile** to indicate for which client you are building for
``` bash
COPY ./server/timesheet-<client>.yaml /timesheet.yaml
RUN yarn run build-<client>
Install Golang and Go dependencies
cd ./server
go get -u ./...
go run timesheet.go db --clean
go run timesheet.go db --load all
go run timesheet.go server
Install Node, npm and yarn and Quasar Framework
Install node
Install npm a yarn yarn (I recommend to use npm for all global packages and yarn for all local packages)
Start the server and client locally
# Open a new terminal and change to the client folder
cd client
# install dependencies
yarn install
# serve with hot reload at localhost:8080
yarn run
Used ports
-
8080 - UI in Vue/Quasar
-
3000 - server in Go
-
5432 - db - postgreSQL
Optionally after/during deployment - replace baseUrl in compiled js files. Not required anymore.
sed -i -e 's/localhost/www.example.com/g' /client/dist/*.js