node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org ยป

mission.core

mission.core

Simple Web Api framework on top of express.js

What is this repository for?

This is core of Web Api using express.js


Introduction

Install

npm install mission.core --save


Configuration

app.ts

import { LoggerFactory, Repository } from 'mission.core';
import { MongoRepo } from 'mission.core/build/mongo';
import { ApiRequest, Paginator } from 'mission.common';
import { Bootstrap } from './bootstrap';
import { DbConfig, WebConfig } from './config';
import { Config } from './app.config';

export class Application {
    public async init(): Promise<void> {
        let logger = LoggerFactory.getLogger([{ 'console': {} }]);
        Paginator.init(Config.DEFAULT_PAGE_SIZE);
        Repository.init(DbConfig, '', logger);
        await MongoRepo.init({}, logger);
        new Bootstrap(WebConfig).init(logger).start();
    }
}

Configuration

Contributors