Coder Social home page Coder Social logo

xxphenomxx / revel-vuecli3-starter Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 1.0 27.78 MB

Golang Revel & Vue CLI3 Starter Kit

Go 28.58% HTML 14.02% JavaScript 12.20% Vue 32.67% TypeScript 12.52%
golang revel vuejs2 vue-cli vuex golang-application starter-kit starter-template starter-project single-page-app

revel-vuecli3-starter's Introduction

Welcome to Revel - Vue CLI 3 Starter Kit

Revel is a high-productivity web framework for the Go language.

Vue CLI is a full system for rapid Vue.js development VueCLI .

VueJS The Progressive JavaScript Framework VueJS .

This starter kit combines the backend power of the Revel framework and the Golang language with the dynamic Vue.JS frontend language. This best of both worlds allows you to build reactive single page applications using Revel/Golang as your backend.

This kit is complete with Vue CLI3 which gives you a powerful command line tool to aid in your frontend application development along with Webpack which handles all of your asset bundling, test running, minification, and transpiling.

Vue CLI 3 kit comes prebundled with the following:

  • Vue.JS (2.5.17)
  • Vue Router (3.0.1)
  • Vuex (3.0.1)
  • Babel (3.1.1)
  • Typescript (3.1.1)
  • SASS processing
  • Chai (4.1.0) / Mocha (5.2.4) Testing

Required:

Setup Instructions

  1. Install NodeJS - Confirm 'npm' command works from command line
  2. Install Golang and setup GOPATH/GOROOT per your environment
  3. Install Revel framework and Revel command line tool
  4. Clone Revel-VueCLI3-Starter to your GOPATH/src directory

To run Vue frontend development server (Open command prompt from project root)

cd public/vue-frontend
npm install
npm run serve

Go to http://localhost:8080 and you'll see:

alt text

To deploy Vue app to Revel (Open command prompt from project root)

cd public/vue-frontend
npm run build

The npm build process will handle all of the testing, transpiling, and bundling of your frontend assets. Once complete Webpack will move all of your assets into Revels /public/ folder along with moving your entry point index.html into Revel's View folder.

To run Revel server w/Vue app (Open command prompt from project root)

revel run -a revel-app

Go to http://localhost:9000 and you'll see:

alt text

Code Layout

The directory structure of a generated Revel application:

conf/             Configuration directory
    app.conf      Main app configuration file
    routes        Routes definition file

app/              App sources
    init.go       Interceptor registration
    controllers/  App controllers go here
    models/       Model / database schema definitions go here  
    views/Vue     Main template and entry point, generated when a 'npm run build' is run from the Vue CLI (public/vue-frontend)

messages/         Message files

public/           Public static assets
    css/          CSS files
    js/           Javascript files
    img/          Image files
    fonts/        Font files
    vue-frontend  Vue CLI 3 application

tests/            Test suites

Help

revel-vuecli3-starter's People

Contributors

xxphenomxx avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

6d617274696e73

revel-vuecli3-starter's Issues

Would you be so kind to deploy this little Vue.js example with Revel?

Hi Jassen,

I'm trying to understand how to use vue.js with revel. Your github's project, Revel-VueCLI3Starter, looks interesting, but I do not understand in Revel-VueCLI3-Starter/app/views/Vue/index.html:
these 2 lines:

<script src=/public/js/chunk-vendors.985c652d.js></script>
<script src=/public/js/app.7e064b8f.js></script>

Where do chunk-vendors.985c652d.js and app.7e064b8f.js come from? And how build these 2 important files up?

As complement to my previous questions, would you be so kind to deploy this little Vue.js example with Revel ? https://github.com/Pupinia/fullstackVue/tree/master/routing/shopping_cart
This would be of great help to understand how to to use Vue.js with Revel.

Thank you very much for your kind help.
Marco

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.