Coder Social home page Coder Social logo

Proxy connection refused about onchat-web HOT 1 CLOSED

onch-at avatar onch-at commented on May 26, 2024
Proxy connection refused

from onchat-web.

Comments (1)

HyperLife1119 avatar HyperLife1119 commented on May 26, 2024 2

This project is still in the development and testing stage, but a temporary solution can be provided:

This project does need a back-end server as the API provider. Since the project is still in the development and testing stage, you can temporarily use the remote back-end server provided by me. You will not need to build the back-end server yourself.

The following is the configuration method:

  1. Use tool mkcert to generate development certificates for the localhost domain name. This will result in a cert file and a key file.
  2. Rename the cert file to localhost.pem
  3. Rename the key file to localhost-key.pem
  4. Move these two files to the project root directory
  5. Open the project root directory
  6. Open the proxy.config.json file and replace all the original configuration of the file with the following configuration:
{
     "/onchat": {
         "target": "https://api.chat.hypergo.net",
         "secure": "false",
         "logLevel": "debug",
         "changeOrigin": true,
         "pathRewrite": {
             "^/onchat": ""
         }
     }
}
  1. Open the src/environments/environment.ts file, find socketUrl, and modify its value to https://api.chat.hypergo.net, example:
export const environment = {
   // Omit part of the code
   socketUrl:'https://api.chat.hypergo.net',
   // Omit part of the code
};
  1. Save all files, open the command line, and execute the command npm run https
  2. Visit https://localhost:4200 in the browser

Related information

Back-end code repository: OnChat
Front-end code repository: OnChat-Web

If you like this project, welcome to star these two code repositories! ⭐

from onchat-web.

Related Issues (3)

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.