Skip to content

MKarapiperakis/node-app

Repository files navigation

Developing RESTful Web Services with Node.js and Express

1.0.0

Release Date: 25/11/2023

Welcome! Before you get started, please ensure that you have the following prerequisites installed and configured.

Prerequisites

  1. Node.js: This project is developed and tested with Node.js version 10.18.1. It is recommended to use this specific version for compatibility. The express-openapi-validate plugin has some issues in the latest node module, so the swagger API will throw an error in the most recent version of node. Find more information here

    # Install Node.js 10.18.1 using your preferred version manager (e.g., nvm or npm)
    nvm install 10.18.1
  2. Server: Ensure that a server is set up and running. This app relies on a server to function correctly.

  3. Environment Variables:

    • Create a new .env file in the root of your project.
    • Copy the content from .env.sample into .env.

Getting Started

To initialize the project, follow these steps:

  1. Install project dependencies:

    npm install
  2. Start the application:

    npm start

Your Node.js app should now be up and running!

Additional Information

1.0.1

Release Date: 26/11/2023

New Features

Node.js and Google DialogFlow Integration:

  • This release introduces seamless integration between Node.js and Google DialogFlow. Now, users can leverage the power of Google DialogFlow directly within their Node.js applications, enhancing the conversational capabilities and interactions of their projects.

Prerequisites

Google Cloud Platform (GCP) Account:

  1. You will need a GCP account with at least one active project.
  2. Create a new service account.
Image 1 Image 2 Image 3 Image 4 Image 5
  1. Create a new key for the respective service account.
Image 5 Image 5
  1. Extract the created JSON file and replace it with the existing one in the path src\controllers\dialogFlowKey.json.

10

  1. Open the controller located at src\controllers\dialogFlow.js and make the necessary changes in line 5 & 9 to reflect the new service account credentials.

Test your agent using Swagger UI

1

2

1.0.2

Release Date: 30/11/2023

New Features

Sending custom emails using nodemailer:

  • In this release, users now have the capability to send customized emails directly from their Gmail accounts using Nodemailer.

Prerequisites

  1. Gmail app password: You need to generate a gmail app password from your Google Account:
Google-account-Security-App passwords-Teamgate-SMTP

google-account-app-password

  1. Environment Variables:
    • Create a new or modify the existing .env file in the root of your project.
    • Copy the content from .env.sample into .env. Three new environment variables have been added:
      1. EMAIL_SENDER
      2. PASSWORD_SENDER
      3. EMAIL_RECEIVER
    • Substitute the initial variable with your Gmail address, the second one with the password generated in the initial step, and choose an email recipient.

Test your server using Swagger UI

image image

Check your Emails!

image

1.0.3

Release Date: 11/12/2023

New Features

Adding Basic Authentication for Enhanced Security

With this release, users have the option to implement Basic Authentication to enhance the security of their API requests.

Prerequisites

  1. Environment Variables:

    • Create a new or modify the existing .env file in the root of your project.
    • Copy the content from .env.sample into .env. One additional environment variable has been added with name BASIC_AUTH. It is a based 64 encoded value: BASIC_AUTH='bm9kZTphcHA=' --> node:app (username:password)
    • Use this username and password in swagger UI

    image

Test your server using Swagger UI

image

Happy coding!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors