Method for dynamically generating local executable file of project based on nodejs script

A technology for dynamically generating and executing files, which is applied in the computer field, can solve problems such as huge maintenance costs and increased maintenance costs of AJAX interfaces, and achieve the effect of convenient development

Pending Publication Date: 2022-03-01
苏州瀚码智能技术有限公司
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

With the continuous increase of project content and the complexity of business, there will be more and more AJAX interfaces in a project, interfaces in some business scenarios will be used repeatedly, and the cost of maintaining AJAX interfaces for front-end developers will also continue to increase
Moreover, if you encounter batch requirements changes related to AJAX requests in the future, the maintenance cost will be extremely huge

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for dynamically generating local executable file of project based on nodejs script
  • Method for dynamically generating local executable file of project based on nodejs script

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.

[0026] The present invention provides a method for dynamically generating project local executable files based on a nodejs script, a computer-readable storage medium and an electronic device, which will be described in detail below. It should be noted that the description sequence of the following embodiments is not intended to limit the preferred sequence of the embodiments of the present invention. And in the following embodiments, the description of each embodiment has its ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a method for dynamically generating a local executable file of a project based on a nodejs script, and the method comprises the following steps: a server side automatically generates an interface document through json, and the interface document is a swager document; the client side uses the node to request the document through the apiGenerator to obtain the json data of the swager document; and the client side dynamically generates a local http.js file through the apiGenerator. The method has the following beneficial effects that a developer only needs to configure an address of a related interface document in a nodejs configuration file before a project is started, then calls apiGenerator to dynamically generate a local http.js file, and directly introduces page calling in business development. And if the change on the unified demand exists subsequently, centralized processing can be carried out in an axios interceptor, or processing can be carried out by modifying the logic of the apiGenerator file.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method for dynamically generating project local executable files based on nodejs scripts, a computer-readable storage medium and an electronic device. Background technique [0002] Separation of front and back ends has become an industry standard usage method for Internet project development. Effective decoupling can be achieved through nginx+tomcat (a nodejs can also be added in the middle), and the separation of front and back ends will provide future support for large-scale distributed architectures and elastic computing architectures. , micro-service architecture, multi-terminal services (multiple clients, such as browsers, vehicle terminals, Android, IOS, etc.) to lay a solid foundation. The core idea of ​​this development method is: the front-end HTML page calls the back-end RESTFUL API interface through AJAX, and uses JSON data for interaction. [0003] With the conti...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/41
CPCG06F8/447
Inventor 王明羊旭峰汪澄周海涛吕大兵黄磊磊张爱春经雨欣
Owner 苏州瀚码智能技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products