Giter VIP home page Giter VIP logo

ktor-vue-starter's Introduction

Ktor with Vue Starter Template

Development

TL;DR Hot reloading in development:

After clone run yarn --cwd src-vue install in project root.

In root directory of project execute:

  • Terminal 1: ./gradlew -t run
  • Terminal 2: yarn --cwd src-vue serve

First run yarn --cwd src-vue install in project root or yarn install in the src-vue directory. For hot reloading you will need two terminals. In the first terminal we want to run our backend with either ./gradlew -t run or gradle -t run when gradle is installed locally. To run the Vue Dev Server either go into the src-vue directory and run yarn serve or execute yarn --cwd src-vue serve in the root directory of the project. To kill both of these processes press CRTL+C in the corresponding terminal.

Production

TL;DR Building for production:

In root directory of project execute:

  • Terminal: ./gradlew build

To build a Fat-JAR for production just execute ./gradlew build or gradle build when gradle is installed locally. This will include the yarn build of the VueJS project. The built page then will be served by Ktor in production. To run the bundled jar from the bundle folder simply run java -jar bundle/example-0.0.1.jar. This will not work on your maschine as it wants to use port 80. You can bypass this by running java -jar bundle/example-0.0.1.jar -port=8080.

Tools

  • Ktor
  • VueJS
  • Gradle
  • Yarn

More

For a more complex example with Vue & Typescript and IR compiler type sharing between Ktor und Vue see https://github.com/Mari-W/ktor-vue-ir-typesharing

ktor-vue-starter's People

Contributors

mari-w avatar

Stargazers

 avatar Dyskal avatar bigmuggle avatar 元路 avatar Lucius avatar Krzysztof Sroga avatar Aaron Rietschlin avatar  avatar  avatar Andrew Schmelyun avatar FilipeA avatar red avatar Drunken Elf avatar George avatar Paule avatar Jotis avatar

Watchers

James Cloos avatar Jotis avatar  avatar  avatar

Forkers

inmediagr

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.