Giter Club home page Giter Club logo

go-vue-starter's Introduction

Go Vue Starter

Create env.json with database and server configuration for local development:

{
	"dbUser": "matt",
	"dbPass": "somepassword",
	"dbName": "starterdemo",
	"httpPort": "2020",
	"versionStamp": ""
}

Version stamp is updated automatically when running restart.sh.

Run sh init.sh to build the frontend, start the server, and initialize the database.

Run sh restart.sh to rebuild the frontend and start the server.

You may have to delete package-lock.json and re-install the dev dependencies listed in package.json at their latest versions to get a working build.

All files in css, img, and js are public.

Add libraries

go mod init github.com/macu/go-vue-starter
go get github.com/jackc/pgx/v4/stdlib
go get github.com/gorilla/mux

Mac setup

A postgres password must be set before the app can connect.

$ brew install postgresql go node jq
$ psql postgres
postgres=# ALTER USER matt WITH PASSWORD 'somepassword';
postgres=# \q
$ cd starterdemo
// Update env.json
$ npm install
$ sh init.sh

Create Postgres database

$ psql postgres
postgres=# CREATE DATABASE starterdemo;

Access database from command line

$ psql starterdemo
postgres=# \dt
postgres=# \d+ user_account

Build and run

On first use, or to re-initialize database:

$ sh init.sh

To rebuild client and server, and run:

$ sh restart.sh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.