Git Product home page Git Product logo

create-ssl-vue-https-server-localhost's Introduction

Create SSL VUE 3 With Https Server Localhost Test

With this script you were able to create certificates simply, with just one command executed via the prompt.

The idea is to facilitate the creation of certificates for developers who use the VUE3 connection and need to test the system using SSL / Https running on localhost

Follow the steps to install the script. Don't skip any steps.

Exemplo de página com ssl ativo

1) Within the root folder of your project, clone the project

git clone https://github.com/Tellys/create-ssl-vue-https-server-localhost.git

2) Go to your project folder/create-ssl-vue-https-server-localhost

cd create-ssl-vue-https-server-localhost

3) Now configure the variables of your SSL certificate

Remember that the variables here are extremely important, because if they are not filled in correctly, the certificate may not work / may not be recognized by the server

cd tool-create-certs-ssl

Open the openssl-custom.cnf file

//openssl-custom.cnf

[dn]
C = <COUNTRY>
ST = <STATE>
L = <LOCALITY / CITY>
O = <ORGANIZATION>
OR = <ORGANIZATION_UNIT>
emailAddress = <EMAIL_ADDRESS>
CN=<HOSTNAME/IP_ADDRESS>

4) Now give the command below for the system to create the certificates

bash generate.sh

5) Create a VUE3 app

cd ../vue3-ssl
npm i

6) Move the certificates to the VUE3 rais folder

mkdir certs
mv ../tool-create-certs-ssl/server.key ../tool-create-certs-ssl/server.crt certs/

7) Check the vue.config.js file

//vue.config.js

const { defineConfig } = require('@vue/cli-service')
const fs = require('fs');

module.exports = defineConfig({
   transpileDependencies: true,
   devServer: {
     server: {
       type: 'https',
       options: {
         key: fs.readFileSync('./certs/server.key'),
         cert: fs.readFileSync('./certs/server.crt'),
       }
     },
     client: {
       webSocketURL: 'wss://localhost:8080/ws',
     },
   }
})

8) Run NPM server

npm run serve

9) Watch video turorial

https://youtu.be/vt5fpE0bzSY

Watch video turorial - https://youtu.be/vt5fpE0bzSY

10) More Information

For More Information, access o link Tutorial Vue3 + SSL HTTPS - https://www.conteudopertinente.com.br/vue3/create-ssl-vue-3-with-https-server-localhost-test/

create-ssl-vue-https-server-localhost's People

Contributors

tellys avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.