Custom tools for NodeJS 🚀
Modern, powerful web application framework for Node.js.
CoreJS is a toolset that helps you to develop and debug modern applications. This tool is made to be used in Node.js, which allows you to easily build efficient, scalable applications. It uses modern JavaScript, is built with TypeScript and bring best JavaScript concepts.
npm install @ialopezg/corejs
import { Application as ApplicationFactory } from '@ialopezg/corejs';
import * as express from 'express'
export class Application implements ApplicationFactory {
constructor(private application: express.Application) {
// do something
}
start() {
// do something before server starts
const port = process.env.APP_PORT || 3000;
this.application.listen(port, () => {
console.log(`Application listen on port: ${port}`);
});
}
}
import { Module } from '@ialopezg/corejs';
@Module({})
export class AppModule {}
import { AppRunner } from '@ialopezg/corejs';
import { AppModule } from './app.module';
import { Application } from './app';
AppRunner.run(Application, AppModule);
Controllers layer is responsible for handling HTTP requests. This is how we create controller in Nest application:
import { Controller } from '@ialopezg/corejs';
import { NextFunction, Request, Response } from 'express';
@Controller({ path: 'users' })
class UsersController {
@RequestMapping({ path: '/' })
getAllUsers(request: Request, response: Response, next: NextFunction) {
response.status(201).json({});
}
}
- Compatible with both TypeScript and ES6 (Recommend to use TypeScript
- Based on well-known libraries (Express / socket.io) so you could easily use your experience
- Easy to learn - syntax is really similar to Angular / Spring (Java)
- Dependency Injection, Inversion of Control Container
- Exceptions handler layer (helps to focus on logic)
- Own modularity system
- Sockets module (based on socket.io)
Documentation & Tutorial - Coming soon
CoreJS is very much still a work in progress. There is still some things to finish:
- Better test utilities
- Exception filters
- Validation helpers
- Starter repos
- Increase test coverage
- Gateway middlewares
- and more...
Author - Isidro A. Lopez G.
CoreJS is licensed under MIT license.
© Copyright 1995-present - Isidro A. Lopez G.