mobius-js
Experiment for simpler web apps
Last updated a year ago by rpetrich .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install mobius-js 
SYNC missed versions from official npm registry.

Mobius

An integrated framework for building web applications, where the DOM, networking, and client/server are abstracted via lockstep execution.

Build Status

Status: Beta

Getting Started

# Install globally
npm install -g mobius-js
# Create new project in current directory
mobius --init
# Start service
npm start

Documentation

Examples

Bento Box

rpetrich/mobius-sample

Simple

import * as dom from "dom";
import { db } from "secrets";
import { execute, sql } from "sql";

export default class extends dom.Component<{}, { clicks: number }> {
	state = { clicks: 0 }
	async componentDidMount() {
		await this.fetchClicks();
	}
	async fetchClicks() {
		const records = await execute(db, sql`SELECT count FROM counter`);
		this.setState({ clicks: records[0].count });
	}
	onClick: async () => {
		this.setState({ clicks: this.state.clicks + 1 });
		await execute(db, sql`UPDATE counter SET count = count + 1`);
		await this.fetchClicks();
	}
	render() {
		return <button onclick={this.onClick}>
			{this.state.clicks}
		</button>
	}
}

Current Tags

  • 0.6.0                                ...           latest (a year ago)

10 Versions

  • 0.6.0                                ...           a year ago
  • 0.5.0                                ...           a year ago
  • 0.4.1                                ...           a year ago
  • 0.4.0                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.2                                ...           a year ago
  • 0.2.1                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.0                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 10
Dependencies (61)
Dev Dependencies (18)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |