New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@mooyaho/engine

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mooyaho/engine

latest
npmnpm
Version
1.0.0-alpha.1
Version published
Weekly downloads
12
-45.45%
Maintainers
2
Weekly downloads
 
Created
Source

Routes Folder

Routes define endpoints within your application. Fastify provides an easy path to a microservice architecture, in the future you might want to independently deploy some of those.

In this folder you should define all the routes that define the endpoints of your web application. Each service is a Fastify plugin, it is encapsulated (it can have its own independent plugins) and it is typically stored in a file; be careful to group your routes logically, e.g. all /users routes in a users.js file. We have added a root.js file for you with a '/' root added.

If a single file become too large, create a folder and add a index.js file there: this file must be a Fastify plugin, and it will be loaded automatically by the application. You can now add as many files as you want inside that folder. In this way you can create complex routes within a single monolith, and eventually extract them.

If you need to share functionality between routes, place that functionality into the plugins folder, and share it via decorators.

FAQs

Package last updated on 02 Sep 2021

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