Skip to content

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

License

Notifications You must be signed in to change notification settings

andresWeitzel/gRPC_IP_Geolocation_API_Integration_Nodejs

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

License

Stars

Watchers

Forks

Packages

No packages published