Achieve — A Developer-Friendly Node.js Web Server
A simpler way to build web applications
Achieve is a web server and HTTP application server for Node.js. It serves websites, handles HTTP requests, and runs JavaScript programs on the server.
Developers can create everything from simple websites to sophisticated web applications using ordinary JavaScript and Node.js modules.
Achieve is designed to make web application development straightforward, without imposing an elaborate framework or requiring a large collection of dependencies.
Looking for an alternative to Express?
Express is a popular framework for building applications on Node.js, but it isn't the only approach.
Achieve offers a different way to organize web applications. Instead of building applications around Express routes and middleware, developers can use JavaScript Servlets: ordinary JavaScript modules that handle HTTP requests.
Achieve is itself a web server, so there is no requirement to install Express or another web framework to handle requests.
Developers retain direct access to Node.js and can use familiar JavaScript functions, modules, and APIs.
For those looking for a lightweight Node.js web server, a simpler backend development environment, or an alternative to Express, Achieve is worth exploring.
JavaScript Servlets
JavaScript Servlets are one of Achieve's central features.
A servlet is an ordinary JavaScript module that exports a function to process an HTTP request. Achieve maps the incoming URL to the appropriate servlet, supplies information about the request, and handles the returned response.
For example, a simple servlet can look like this:
exports.servlet = function (session) {
return "Hello World!";
};
When a browser requests the servlet, Achieve executes the function and returns the result to the browser.
There is no need to write the usual HTTP response-handling code for simple results.
For more advanced applications, the servlet can access the underlying Node.js request and response objects and manage the response directly.
Servlets can also use ordinary JavaScript functions, built-in Node.js modules, and additional npm packages.
JavaScript Servlets simplify request handling without restricting what developers can build.
Development without unnecessary interruptions
Achieve supports automatic reloading of modified servlet source files in development mode.
Edit a servlet, save the file, and request it again. Achieve loads the modified code without requiring a server restart.
This makes it convenient to experiment, test changes, and develop applications incrementally.
Achieve also provides useful error reporting to help developers identify problems in application code.
More than a servlet runner
Achieve combines JavaScript Servlet execution with the capabilities of a web server and HTTP application server.
It supports static resources, configurable URL routing, HTTP and HTTPS, HTTP/2, conditional requests, compression, and other HTTP features.
Applications can serve HTML, CSS, JavaScript, images, and other resources while using JavaScript Servlets for backend processing, such as handling forms, processing data, or responding to JSON requests.
Because Achieve is built on Node.js, applications can also interact with databases, external services, and other software using the extensive Node.js ecosystem.
Getting started with Achieve
Achieve is available through npm, the Node.js package manager.
The documentation includes beginner tutorials, configuration information, servlet examples, and technical reference material.
You can explore Achieve through these resources:
- Documentation and tutorials
https://highlevellogic.github.io/achieve/ - Install Achieve from npm
https://www.npmjs.com/package/achieve - Source code on GitHub
https://github.com/highlevellogic/achieve
Achieve is developed as part of the High Level Logic Project.
Whether you're learning backend programming, building a web application, or exploring alternatives to established Node.js frameworks, Achieve offers another approach: a complete web server with a simple, flexible JavaScript programming model.