GithubHelp home page GithubHelp logo

holtwick / zerva-vite-plugin Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 384 KB

๐ŸŒฑ Zerva Vite integration

License: MIT License

JavaScript 4.28% TypeScript 95.72%
zerva zeed vite vitejs vite-plugin vite2 vue3

zerva-vite-plugin's Introduction

๐ŸŒฑ Zerva Vite

DEPRECATED. Please use zerva-vite instead. Thanks.


This is a side project of Zerva

Integrate Zerva modules into vite.config.ts using this Vite Plugin.

This is perfect to use and test your server side code while developing the frontend without handling parallel launching and running server processes.

The plugin already calls useHttp with the same port as the vite process. In fact it is the same server instance Vite uses. Custom routes can be added or sockets get bound to it.

Get started

import { defineConfig } from "vite"
import vue from "@vitejs/plugin-vue"
import { useSocketIO } from "zerva-socketio"
import { viteZervaPlugin } from "./src/module"

export default defineConfig({
  plugins: [
    vue(),

    // Make use of Zerva from inside Vite server
    viteZervaPlugin(async () => {
      // Zerva modules
      useSocketIO()
    }),
  ],
})

See demo for a more complex example.

zerva-vite-plugin's People

Contributors

holtwick avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.