Skip to main content

Introduction

AxiSpark.js is a powerful and flexible Node.js framework designed to simplify the development of web applications. It uses modern TypeScript features and provides a robust set of tools and libraries to help developers build scalable and maintainable applications.

Philosophy​

JavaScript and Node.js make it easy to build powerful applications, but as projects grow, keeping them simple, organized, and maintainable becomes a challenge. AxiSpark.js was created to provide a simple and flexible architecture for building modern applications without unnecessary complexity.

AxiSpark.js focuses on simplicity, clarity, and scalability, giving developers the freedom to start small and grow naturally as their applications evolve.

Starting a New Project​

To scaffold a new AxiSpark.js project, you can use the AxiSpark CLI. This tool will help you set up a new project with the necessary structure and dependencies. Creating a new project with the CLI is recommended for first-time users.

npm install -g @axisparkjs/cli
axispark create project-name

The CLI creates the project in the project-name directory. Choose a template interactively or pass its name with --template:

TemplateExample contents
defaultBasic application with a sample plugin.
httpExpress HTTP server with a /api/example controller.
http-securityHTTP server with a demo authenticator, an admin authorization policy, and a protected route. The example credential is Authorization: Demo admin; adapt authentication to your identity provider.
schedulerScheduler plugin with a job that logs every five seconds.
http-openapiHTTP server with a documented greeting response and an OpenAPI schema. The JSON document is available at /api/openapi.json.

For example, create the HTTP and Security starter, install its dependencies, and start it in development mode:

axispark create my-app --template http-security
cd my-app
npm run dev

Each template is implemented in TypeScript and includes npm run dev, npm run build, and npm start scripts.