当前位置: 首页 > wzjs >正文

嘉定网站公司站长工具之家

嘉定网站公司,站长工具之家,7月新闻大事件30条,做网站前端用什么系列文章目录 davinci本地启动: link 文章目录 系列文章目录1.后台启动1.1 准备mysql数据库1.2 改配置文件 2 启动前端项目2.1 npm install2.2 运行npm start 失败 3 配置nginx4 访问 http://localhost:8080/davinci 1.后台启动 1.1 准备mysql数据库 本人使用的是mysql8.0.1…

系列文章目录

davinci本地启动: link


文章目录

  • 系列文章目录
  • 1.后台启动
    • 1.1 准备mysql数据库
    • 1.2 改配置文件
  • 2 启动前端项目
    • 2.1 npm install
    • 2.2 运行npm start 失败
  • 3 配置nginx
  • 4 访问 http://localhost:8080/davinci


1.后台启动

1.1 准备mysql数据库

本人使用的是mysql8.0.19的版本所以需要把mysql-connector-java的版本调至8.0.19
pom.xml

        <dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><!--<version>5.1.44</version>--><version>8.0.19</version></dependency>

数据库信息:
在这里插入图片描述
调整config/application-dev.yml中的datasource

  datasource:type: com.alibaba.druid.pool.DruidDataSourceurl: jdbc:mysql://localhost:3306/mysql_db1?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=falseusername: <你的账号>password: <你的密码>

进入数据库执行bin/davinci.sql创建所需要的表
在这里插入图片描述

1.2 改配置文件

改后台端口号 与 环境变量中的${DAVINCI3_HOME}
config/application.yml

server:protocol: httpaddress: 127.0.0.1port: 18080 #根据你的来url: http://localhost:18080 # 根据你的来

server\src\main\resources\application.yml
${DAVINCI3_HOME}这个变量可以在系统环境变量中设置,这样你在配置文件中就不用设置了。如果不想设置在环境变量可以手动改成你的项目路径

#第一处
file:userfiles-path: <你的项目路径>/userfiles/web_resources: <你的项目路径>/davinci-ui/base-path: <你的项目路径>/lib/
#第二处
logging:config: file:<你的项目路径>/config/logback.xml
#第三处
custom-datasource-driver-path: <你的项目路径>/config/datasource_driver.yml

config/application-dev.yml
注释掉截图的配置,有可能会报错.
更改端口
设置本项目的context-path后面呢nginx会用到

screenshot:
#  default_browser: CHROME
#  timeout_second: 600
#  chromedriver_path: $your_chromedriver_path$
#  remote_webdriver_url: $your_remote_webdriver_url$server:protocol: httpaddress: 127.0.0.1port: 18080servlet:context-path: /davinci

运行DavinciServerApplication修改Active profiles为dev:
在这里插入图片描述
成功启动日志:
在这里插入图片描述

2 启动前端项目

2.1 npm install

在webapp目录下运行 npm install 成功

npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm warn deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm warn deprecated intl-relativeformat@2.2.0: This package has been deprecated, please see migration guide at 'https://github.com/formatjs/formatjs/tree/master/packages/intl-relativeformat#migration-guide'
npm warn deprecated eslint@6.6.0: This version is no longer supported. Please see https://eslint.org/version-support for other options.
npm warn deprecated core-js@1.2.7: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.> davinci-webapp@0.3.0 preinstall
> npm run npmcheckversion> davinci-webapp@0.3.0 npmcheckversion
> node ./internals/scripts/npmcheckversion.jsadded 2246 packages in 2m155 packages are looking for fundingrun `npm fund` for details

2.2 运行npm start 失败

在这里插入图片描述
出现了 ​​Error: error:0308010C:digital envelope routines::unsupported​​ 错误。这是 ​​Node.js 18+ 与 Webpack 4 的兼容性问题​​,原因是 Node.js 18+ 默认使用 OpenSSL 3,而旧版 Webpack 4 的哈希算法不兼容
设置 OpenSSL 兼容模式(临时)​​
在启动命令前添加环境变量,强制使用旧版 OpenSSL:

# Linux/macOS
export NODE_OPTIONS=--openssl-legacy-provider
npm start# Windows (PowerShell)
$env:NODE_OPTIONS="--openssl-legacy-provider"
npm start

成功启动:
在这里插入图片描述

3 配置nginx

nginx.config主要是server 中的对于davinci中的转发


#user  nobody;
worker_processes  1;#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;#pid        logs/nginx.pid;events {worker_connections  1024;
}http {include       mime.types;default_type  application/octet-stream;#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '#                  '$status $body_bytes_sent "$http_referer" '#                  '"$http_user_agent" "$http_x_forwarded_for"';#access_log  logs/access.log  main;sendfile        on;#tcp_nopush     on;#keepalive_timeout  0;keepalive_timeout  65;#gzip  on;server {listen       80;server_name  localhost;location / {root   html;index  index.html index.htm;}error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}}server {listen       8080;# listen       443 ssl;server_name  localhost;ssl_session_cache    shared:SSL:1m;ssl_session_timeout  5m;ssl_ciphers  HIGH:!aNULL:!MD5;ssl_prefer_server_ciphers  on;server_tokens off;client_max_body_size 100m;# davinci 的配置到你的端口号location /davinci/ {proxy_pass http://localhost:18080;
#            proxy_http_version 1.1;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto $scheme;}# davinci/backend 的转发location /backend {proxy_pass http://localhost:18080/davinci;
#            proxy_http_version 1.1;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto $scheme;        }location /dashboard {index index.html;try_files $uri $uri/ /dashboard/index.html; # 用于支持单页应用的HTML5 History Mode}location /dashboard2 {index index.html;try_files $uri $uri/ /dashboard2/index.html; # 用于支持单页应用的HTML5 History Mode}error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}}
}

4 访问 http://localhost:8080/davinci

在这里插入图片描述
附npm version

{npm: '10.8.2',node: '20.18.0',acorn: '8.12.1',ada: '2.9.0',ares: '1.33.1',base64: '0.5.2',brotli: '1.1.0',cjs_module_lexer: '1.4.1',cldr: '45.0',icu: '75.1',llhttp: '8.1.2',modules: '115',napi: '9',nghttp2: '1.61.0',nghttp3: '0.7.0',ngtcp2: '1.1.0',openssl: '3.0.13+quic',simdutf: '5.5.0',tz: '2024a',undici: '6.19.8',unicode: '15.1',uv: '1.46.0',uvwasi: '0.0.21',v8: '11.3.244.8-node.23',zlib: '1.3.0.1-motley-71660e1'
}
http://www.dtcms.com/wzjs/209612.html

相关文章:

  • 奇趣网做网站苏州seo怎么做
  • 网站做充值和提现深圳网络推广培训机构
  • 宝鸡网站建设公司都有哪些软文广告图片
  • 鲁 网站 备案公司快速建站
  • 网站建设先航科技杭州搜索引擎优化公司
  • 国家城乡住房建设部网站首页自媒体135的网站是多少
  • 网站建设怎么申请空间东莞关键词优化实力乐云seo
  • vue做社区网站各种资源都有的搜索引擎
  • 做ktv网站大概多少钱班级优化大师的功能
  • 深圳建科院公司网站微信卖货小程序怎么做
  • 登不上建设银行网站今日头条新闻最新消息
  • 阿里云的网站建设好不好百度推广是干什么的
  • ecshop网站价格国际新闻界期刊
  • 建站的好公司精准营销推广
  • 西安做网站微信公司百度云搜索引擎入口手机版
  • 个人主页图标郑州百度搜索优化
  • 电商网站建设的核心是什么自助建站平台
  • 甘肃企业建站系统费用口碑seo推广公司
  • 网站开发的一般流程seo广告投放
  • 团购网站做摄影seo关键词优化排名公司
  • 宁波怎么做网站排名优化必应搜索
  • 商城网站设计说明书北京seo关键词排名优化
  • 商务网站开发开题报告郑州网站推广多少钱
  • 无为县城乡建设局网站首页最好的网站设计公司
  • 网站开发人员定罪案例一键建站免费
  • 区住房城乡建设委 房管局 官方网站职业技术培训
  • 深圳南头网站建设公司百度资源搜索资源平台
  • 淘宝网站怎么做的好看如何找推广平台
  • 十堰网站制作公司计算机培训机构排名
  • 静态网站 搜索万网阿里云域名查询