npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

api-express-cli

v1.0.8-8

Published

api-express-cli is an tool with an integrated cli, which allows generating models, routes, and controllers

Downloads

7

Readme

Express Cli - For API

Documentation

Sapanish:

api-express-cli es un mini framework para Node.js que se encuentra disponible como paquete npm. Con este framework, puedes crear un proyecto básico de API con gran facilidad y personalizarlo a tu gusto.

El framework te permite crear controladores, entidades y servicios de manera rápida y sencilla, mediante un comando. Además, puedes añadir diferentes tipos de módulos también con un comando, lo que te permite integrar funcionalidades como la conexión a bases de datos y el envío de correo por SMTP.

Uno de los puntos fuertes de api-express-cli es su fuerte tipado. Esto te permitirá trabajar con mayor comodidad y seguridad al programar tu API.

En definitiva, api-express-cli es una herramienta muy útil para aquellos que quieren crear APIs de manera rápida y sencilla, pero con la posibilidad de personalizarla a su gusto y con una gran variedad de funcionalidades integradas.

English:

api-express-cli is a mini framework for Node.js that is available as an npm package. With this framework, you can create a basic API project easily and customize it to your liking.

The framework allows you to quickly and easily create controllers, entities, and services using a command. In addition, you can add different types of modules with a command, which allows you to integrate functionalities such as database connection and SMTP email sending.

One of the strengths of api-express-cli is its strong typing. This will allow you to work more comfortably and safely when programming your API.

In short, api-express-cli is a very useful tool for those who want to create APIs quickly and easily, but with the possibility of customizing it to their liking and with a variety of integrated functionalities.

Setting up a project

Install api-express-cli in dev dependecies:

npm i -g api-express-cli

Initialize project:

aec create <name-your-project>

This will create a structure for the project, It has a basic http server to start working.

The following image shows the structure created.

1663281512795

Note: For the following command table, you can create multiple values such as routes, controllers, services, and entities that are separated by space. If you want you can create just by running the command without the value, and the system will help you step by step.

| Commands | Value | Params | Example | Description | | :------------------ | :-------------------: | :----: | :---------------- | :--------------------------------------------------------------- | | aec create | <your-name> | | aec api-test | Create project name with given name | | aec route | <route1 route2> | | aec r users | Create a route with the given name | | aec controller | <ctrl1 ctrl2> | | aec c users | Create a controller with the given name | | aec r+c | <user employee> | | | Create a route and controller with the given name. | | aec service | <auth send-mail> | | aec s auth | Create a service with the given name | | npx aec entity | <users employees> | | aec e users | Create an entity with the given name: (controller, route, model) | | npx aec remove | db or ws | | npx aec rm db | Removes one of the utilities that is added. | | npx aec --help | | | aec -h  | Show command help |

⚠️ Warning: Do not remove or edit source code comments.

Quick start

After initializing the project, to verify that everything went well, you have to execute the following commands:

  • Transpile code from ts to js.

    npm run watch-ts

  • Start server.

    npm run dev:watch-server

You can then see if it is operating correctly by putting this http://localhost:3000 in your browser.