Expressive.js is a new way to write applications without all the junk.
Most notably, it can be used to write client and server applications with ease, using only a simple javascript object format.
Expressive.js is highly configurable and can easily be extended in many facets using a simple plugin architecture. Framework developers provide a simple abstraction layer for things like loggers, protocols, data consumers, and even route transformations.
To the end user (you!), none of that matters except getting to Express your application the way you want. Expressive.js has a full-featured UI tool to help you create projects without writing a single line of code!
const routes = {
user: function(name, callback) {
callback(null, `Username: ${name}`)
or
return await `Username: ${name}`
},
}
const expressive = require('expressive')(routes)
expressive.start()
import Fetch from 'expressive-react-fetch'
const routes = 'http://example.com/routes'
const fetch = Fetch(routes)
let user = await fetch.users.read(userId)
// Do something with user
✔️ Complete
🔜 Almost done
📦 Work in Progress
⛺ Not started yet
💬 Proposal
🚫 Rejected
- ✔️ Highly Configurable
- ✔️ Nested capable Object structure defines your routes
- ✔️ CRUD-L (Create, Read, Update, Delete, List) routing syntax
- ✔️ Custom CRUD-L verbiage terms
- ✔️ Route functions lets you omit CRUD-L terms for quick single routes
⚠️ Route functions can be marked as private and only accessible to your business logic- ✔️ Auth/Validation routes run before your CRUD routes (with filtering support)
- ✔️ Automatic parameter destructuring
- ✔️ Context support for routes to access low-level Protocol API
- ✔️ Simple Plugin architecture for new Protocols, just 3 methods!
- ✔️ Simple Plugin architecture for logging Plugins
⚠️ Extend the route object syntax with Transpiler Plugins.- 🔜 Hot/Live reload Plugin architecture
- 📦 Dynamic Client-side routing file (No more hard-coding URL paths!)
- 📦 Isometric (Re-use the same code on both client and server)
- ⛺ CommonJS, ES6, AMD builds available
⚠️ CLI tooling to create new Expressive.js projects with sane defaults⚠️ UI tool to organize projects, quickly create routes. Full support for config, logging.- 💬 Custom 404 routes
- 💬 Route specific verb terms
- 💬 Async/Await support for route functions
- 💬 Port to TypeScript
- 📦 React Native Fetch
- ⛺ React Native Socket.io
- ⛺ React Native AMP
- ✔️ ANSI Console - Plugin
- ⛺ Logstash
cd myProject
npm init -y
npm install expressive --save
npm start
npm install expressive-cli -g
expressive init myProject
expressive install express
expressive start
const routes = {
users: {
create: function(user, password, callback) {
callback(null, 'Created user')
},
read: function(user, callback) {
callback(null, 'Reading user')
},
...
},
}
const terms = {
verbs: {
create: 'post',
read: 'get',
update: 'put',
delete: 'delete',
list: 'options',
auth: 'auth',
// Partial terms are coming soon!
}
}
const routes = {
users: {
post: createUser, // Function
get: getUser, // Function
...
}
}