Skip to content

Repository files navigation

Index app

gRPC_IP_Geolocation_API_Integration_Nodejs

gRPC protobuf api for the integration of IPWHOIS.IO services implemented with Nodejs, Expressjs, Jest, Testing, others.


Index 馃摐

See

Section 1) Description, configuration and technologies

Section 2) Endpoints and Examples

Section 3) Functionality Testing and References



Section 1) Description, configuration and technologies

1.0) Description 馃敐

See

1.0.0) General Description

1.0.1) Description Architecture and Operation


1.1) Project Execution 馃敐

See

1.1.0) Initial settings

  • Once a work environment has been created through some IDE, we clone the project
git clone https://github.com/andresWeitzel/gRPC_Netflix_CRUD_Nodejs
  • We position ourselves on the project
cd 'projectName'
  • We install the latest LTS version of Nodejs(v18).
  • We install all the necessary libraries
npm i
  • The environment variables used in the project are maintained to simplify their configuration process. It is recommended to add the corresponding file (.env) to the .gitignore.
  • The following script configured in the project's package.json is responsible for
    • Raise the server with express (productive environment)
    • Raise the server with express and nodemon (local dev environment)
"scripts": {
    "dev": "nodemon src/server.js",
    "start": "node src/server.js"
  },
  • We run the app from a terminal for a local environment.
npm run dev
  • We run the app from a terminal for a productive environment.
npm start
  • If a message appears indicating that port 8080 is already in use, we can terminate all dependent processes and run the app again
npx kill-port 8080
npm run dev or npm start

1.2) Project configuration from scratch 馃敐

See

1.2.0) Initial settings

  • Once a work environment has been created through some IDE, we clone the project
git clone https://github.com/andresWeitzel/gRPC_Netflix_CRUD_Nodejs
  • We position ourselves on the project
cd 'projectName'
  • We install the latest LTS version of Nodejs(v18)
  • We open a terminal from vsc
  • We initialize a nodejs project
npm init -y
  • We create a .gitignore file and add the necessary files (for the moment node_modules)
node_modules
  • We create a direct source (src) to add all the logic of our app
  • We install the plugin for express (framework)
npm i express
npm i cors
npm i dotenv
npm i morgan

We install uuid for unique ids

npm i uuid
npm i -g nodemon
npm i nodemon --save-dev
npm i @grpc/proto-loader
  • The environment variables used in the project are maintained to simplify their configuration process. It is recommended to add the corresponding file (.env) to the .gitignore.
  • The following script configured in the project's package.json is responsible for
    • Raise the server with express (productive environment)
    • Raise the server with express and nodemon (local dev environment)
"scripts": {
    "dev": "nodemon src/server.js",
    "start": "node src/server.js"
  },
  • We run the app from a terminal for a local environment.
npm run dev
  • We run the app from a terminal for a productive environment.
npm start
  • If a message appears indicating that port 8080 is already in use, we can terminate all dependent processes and run the app again
npx kill-port 8080
npm run dev or npm start

1.3) Tecnolog铆as 馃敐

Ver

| Tecnolog铆as | Versi贸n | Finalidad |
| ------------- | ------------- | ------------- | | SDK | 4.3.2 | Inyecci贸n Autom谩tica de M贸dulos para Lambdas | | NodeJS | 14.18.1 | Librer铆a JS | | VSC | 1.72.2 | IDE | | Postman | 10.11 | Cliente Http | | CMD | 10 | S铆mbolo del Sistema para linea de comandos | | Git | 2.29.1 | Control de Versiones |


| Plugin | Descripci贸n |
| ------------- | ------------- | | Serverless Plugin | Librer铆as para la Definici贸n Modular |


| Extensi贸n |
| ------------- | | Prettier - Code formatter | | YAML - Autoformatter .yml (alt+shift+f) |



Secci贸n 2) Endpoints y Ejemplos.

2.0) Endpoints y recursos 馃敐

Ver


Secci贸n 3) Prueba de funcionalidad y Referencias.

3.0) Prueba de funcionalidad 馃敐

Ver

3.1) Referencias 馃敐

Ver

IPWHOIS.io api doc

Documentaci贸n

Ejemplos c贸digo

Protocolo buffer (protobuf)

Librer铆as

Remark-lint

Jest



About

gRPC protobuf api for the integration of IPWHOIS.IO services implemented with Nodejs, Expressjs, Jest, Testing, others.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages