Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

efesto

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

efesto

[image] Efesto

  • 0.6.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
555
decreased by-8.42%
Maintainers
1
Weekly downloads
 
Created
Source

[image] Efesto

A NodeJS framework based on Express, Swagger, Multer, Express-Validator.


Changelog

To see the latest implementation on Efesto, take a look at the Changelog

Installation

install Efesto in your project using

npm install efesto

or

yarn add efesto

Setup

In your app file use express to define the main API path and use the efesto main function as middleware

import efesto from "efesto"
import {createServer } from "http"

class App {
public app: express.Application;
    constructor() {
        this.app = express();
        this.config();
    }

    private function config(){

      this.app.use(
        "yourMainApi/path",
      efesto({
        authMiddleware: yourAuthMiddleware(),
        errorMiddleware:yourErrorMiddleware(),
        absoluteDirRoutes: "efesto/files/main/path",
        relativeDirSwaggerDeclarationsPath: "swagger/generation/out/dir",
        isProduction: isProduction,
      })
    );

  }
}

const app = new App().app

const server = createServer(app)

server.listen(4646, ()=>{
  console.log("Server listening on port 4646")
})

now your server is ready to go!

Create API paths with efesto

Efesto path generation is based on the structure of the files in the efesto directory.

For example, if you have declared "/efesto" as efesto's main directory and you create the "efesto/users" file the endpoint will be yourApiMain/path/users.

Parameters in path

Efesto also supports dynamic parameters in the API paths. For example, if your create the "efesto/users/[id]" the endpoint will be yourApiMain/path/users/:id

Usage

each efesto file must have

FAQs

Package last updated on 11 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc