todo-go-reactjs

command module
v0.0.0-...-b6f969d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2019 License: MIT Imports: 10 Imported by: 0

README

todo-go-reactjs

Todo application with Go as Backend and ReactJS as Frontend

Todo List

How to build frontend

The following Go dependencies are required to compile

go get github.com/go-bindata/go-bindata/go-bindata
go get github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs

The next thing is to compile the frontend for that you have to have nodejs and execute the following commands

npm --prefix=frontend install
npm --prefix=frontend run build

Now we compile the assets of the build folder

go-bindata-assetfs -pkg=frontend -nocompress=false -o=frontend/frontend.go frontend/build/...

Build binary

After following the previous steps we execute the following command.

go build -v -ldflags "-s -w"
# Ejecute
todo-go-reactjs

Build with go script

Run

go run ./gobuild

Example

2019/10/16 16:39:12 Building please wait...
2019/10/16 16:39:12 Runing: go get github.com/go-bindata/go-bindata/go-bindata
2019/10/16 16:39:13 Runing: go get github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs
2019/10/16 16:39:14 Runing: npm install
2019/10/16 16:39:38 Runing: npm run build
2019/10/16 16:39:52 Runing: go-bindata-assetfs -pkg=frontend -nocompress=false -o=frontend/frontend.go frontend/build/...
2019/10/16 16:39:52 Runing: go build -v -ldflags -s -w

Then run binary

todo-go-reactjs

Run from docker

docker run --rm -p 8080:80 ramosisw/todo-go-reactjs 

and open http://localhost:8080 if you use docker-machie probably hosted on http://192.168.99.100:8080

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Code generated for package frontend by go-bindata DO NOT EDIT.
Code generated for package frontend by go-bindata DO NOT EDIT.
Script to build application
Script to build application
Package handler include todo handlers to common REST methods
Package handler include todo handlers to common REST methods
Package models include db conection and todo model to persist with database
Package models include db conection and todo model to persist with database

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL