1.6.2 • Published 5 years ago

connectia v1.6.2

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

img

Connectia | Simple & Lightweight ajax framework for nodeJS.

Simple webserver with ajax support, powered by Express.

Features

  • Easy and intuative ajax features
  • JSON and URI encoded for sending any variable type
  • Support for special characters (åäö) in contents
  • Minimal code required to get started
  • Lightweight
  • URL extention shortener (/home.html and /home works)

Usage, Server

Check out a full example here with a cookie-token-auth system https://github.com/Yogsther/connectia-example

npm i connectia
const Connectia = require("connectia")
const con = new Connectia(__dirname + "/cdn");

con.on("greeting", (message, emit) => {
    emit("greeting", `Hello ${message.username}!`)
})

Usage, Client

For client side, provide Connectia.js in the <head> of your document:

<!-- Connectia CDN -->
<script src="https://connectia.ygstr.com/client/Connectia.js"></script>

Then for your javascript, connect to the node server with a new instance of Connectia.

var con = new Connectia();

con.emit("greeting", {
    username: "Yogsther"
})

con.on("greeting", message => {
    console.log(message) // Hello Yogsther!
})
1.6.2

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.13.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago