GithubHelp home page GithubHelp logo

micahli / go-vue-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ricoberger/go-vue-starter

0.0 1.0 0.0 4.2 MB

go-vue-starter demonstrates the usage of Go and Vue.js

License: MIT License

Makefile 4.52% Go 41.87% HTML 8.90% JavaScript 0.06% Vue 34.27% TypeScript 10.37%

go-vue-starter's Introduction

Go ♥ Vue Starter

This project contains a quick starter kit for a Go project using Vue as single page app. The Go server uses MongoDB to store data, supports JWT authentication and embedding the Vue build. The Vue single page app supports routing via Vue Router, state management via Vuex and implements Googles Material Design using Vuetify.

Landing Page

Features

  • Go API using Gorilla mux
  • Go server to serve the Vue app
  • MongoDB integration
  • JWT authentication
  • Embedding Vue build into Go binary using esc
  • Go server configuration via .yml file
  • Using Go Modules for dependency management
  • Makefile based project
  • Routing via vue-router
  • State management via vuex
  • Material Design using vuetify
  • TypeScript support
  • Class-Style Vue Components

Dashboard

Building and running

The Go ♥ Vue Starter contains a Go server which serves the single page Vue app and an API whiche handles all request from the Vue frontend. To run the Go server and Vue app as seperated process run the following commands:

git clone github.com/ricoberger/go-vue-starter

# Run the Vue app on localhost:8080
cd go-vue-starter/app

yarn install
yarn serve

# Run the Go server on localhost:8081
cd go-vue-starter

make build
./bin/starter

If you want to serve the Vue frontend app within the Go server run:

git clone github.com/ricoberger/go-vue-starter

# Build the Vue app
cd go-vue-starter/app

yarn install
yarn build

# Run the Go server and the Vue app on localhost:8080
cd go-vue-starter

make build
./bin/starter

Usage and configuration

You can build and run the Go ♥ Vue Starter by your own or you can use the prebuild binaries. Befor you start the Go ♥ Vue Starter edit the config.yml file:

# Port where the go-vue-starter should listen on
listen_address: :8080

api:
  # Domain is for the frontend
  domain: http://localhost:8080
  # Signing secret for the jwt authentication
  signing_secret: "your-super-secret"

app:

database:
  # Connection URL for MongoDB and the name of the MongoDB database
  mongodb:
    connection_uri: mongodb://localhost:27017
    database_name: go-vue-starter

# Email credentials to send the verification, reset password, etc. email
mail:
  identity:
  username:
  password:
  host:
  addr:
  from:

  # Use html or plaintext emails, must be true or false
  html:

  # Email subjects
  subjects:
    welcome: "Welcome to the Go + Vue Starter"
    reset-password: "Reset password request"
    email-verification: "Verify your email address"
    email-changed: "Your email address has been changed"

After you adjust the configuration file you can use the Go ♥ Vue Starter as follows:

Usage of starter:
  -config.file string
      Path to the configuration file. (default "config.yml")
  -debug
      Show debug information.
  -version
      Show version information.

Dependencies

Go ♥ Vue Starter is build up on some dependencies for Go and Vue. The Go dependencies are:

The dependencies for the Vue app are:

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.