This isn't another wrapper around Express or a framework for building frameworks. This also isn't a replacement for server-side frameworks that render DHTML.
After your learn how to use it, you'll rarely need to look at the docs.
Or more appropriately somewhat pure functions are awesome.
Serving content is done by returning objects, arrays, or other primitives rather than calling
res.end(/* content */); and returning nothing.
Frameworks like Rails are pretty great. You can build amazing applications in a reasonable amount of time without a ton of developers working on a project. They have their limitations though. They can be slow and sometimes hard to scale. Not to mention WebSocket support being so-so.
I can somewhat see why people would think that when returning a list of the first 10 records from a SQL database table looks like this:
Could you imagine how ugly that gets when you have to implement pagination, filtering, sorting, or—better yet—formatting the response for JSON API?
Also, where does that code live? In what file and folder would I find it? What pattern do you use for organizing this code?
😲Ok ok give me back Rails I'll worry about performance and scaling later. After all, premature optimization is the root of all evil.
With Lux your code from before can now look like this:
Except CRUD actions are taken care of automatically so it would actually look like this:
It's about time a Node server framework learned something from client-side JS frameworks.
npm install -g lux-framework
new command to create your first project.
lux new <app-name>
To run your application use the
cd <app-name>lux serve
For more information checkout out the Guides.
git clonecd luxnpm install
git clone# Install Lux dependenciescd luxnpm install# Install test app dependenciescd test/test-appnpm install# Run the test suitecd ../../npm test