# fuxa-app **Repository Path**: zuopt/fuxa-app ## Basic Information - **Project Name**: fuxa-app - **Description**: 基于fuxa的开发项目 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 3 - **Created**: 2022-11-24 - **Last Updated**: 2024-10-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 在 Linux Ubuntu 上安装 Node.js、Nginx 和 Git ## 安装 Node.js 1. **添加 Node.js PPA 源:** ```bash sudo apt update sudo apt install -y curl curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - 请注意:上述命令中的 14.x 可以替换为您想要安装的 Node.js 版本。 安装 Node.js: bash Copy code sudo apt install -y nodejs 检查安装是否成功: bash Copy code node -v npm -v 这应该分别显示安装的 Node.js 和 npm 的版本。 安装 Nginx 使用 apt 安装 Nginx: bash Copy code sudo apt install -y nginx 启动 Nginx 服务: bash Copy code sudo systemctl start nginx 设置 Nginx 在系统启动时自动启动: bash Copy code sudo systemctl enable nginx 检查 Nginx 是否运行: bash Copy code sudo systemctl status nginx 这应该显示 Nginx 正在运行。 配置 Nginx 反向代理(可选) 如果您打算使用 Nginx 作为 Node.js 应用的反向代理,您需要配置 Nginx 以将请求转发到 Node.js 应用。 打开 Nginx 的默认站点配置文件: bash Copy code sudo nano /etc/nginx/sites-available/default 在 location / 部分添加反向代理配置。例如,如果 Node.js 应用运行在本地的 3000 端口上,添加如下配置: nginx Copy code location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } 保存并关闭文件,然后重新加载 Nginx 配置: bash Copy code sudo systemctl reload nginx 安装 Git bash Copy code sudo apt update sudo apt install -y git 验证是否成功安装 Git: bash Copy code git --version 如果还没有设置 Git 用户信息,使用以下命令配置: bash Copy code git config --global user.name "Your Name" git config --global user.email "your.email@example.com" 将 "Your Name" 和 "your.email@example.com" 替换为您的姓名和电子邮件地址。 go Copy code 上述内容已经以Markdown格式呈现,您可以将其保存为`.md`文件,然后使用Markdown编辑器或查看器查看。 ![fuxa logo](/client/src/favicon.ico) # FUXA FUXA is a web-based Process Visualization (SCADA/HMI/Dashboard) software. With FUXA you can create modern process visualizations with individual designs for your machines and real-time data display. ![fuxa editor](/screenshot/fuxa-editor.png) ![fuxa ani](/screenshot/fuxa-ani.gif) ![fuxa action](/screenshot/feature-action-move.gif) ## Features - Devices connectivity with Modbus RTU/TCP, Siemens S7 Protocol, OPC-UA, BACnet IP, MQTT, Ethernet/IP (Allen Bradley) - SCADA/HMI Web-Editor - Engineering and Design completely web-based - Cross-Platform Full-Stack - Backend with NodeJs and Frontend with Web technologies (HTML5, CSS, Javascript, Angular, SVG) ## Live Demo Here is a [live demo](https://frangoteam.github.io) example of FUXA editor. ## Installing and Running FUXA is developed with NodeJS (backend) and Angular (frontend). You need to have installed [Node](https://nodejs.org/en/about/previous-releases) Version 14.21.3 (npm 6.14.18) || 16.20.2 (npm 8.19.4) || 18.18.2 (npm 9.8.1). **WARNING** In linux with nodejs Version 16.20.2 || 18.18.2 there are problems with the node-snap7 library for communication with Siemens S7 PLCs, if you don't intend to use it you can remove it from the server/package.json Install from [NPM](https://www.npmjs.com/package/@frangoteam/fuxa) (first option) In linux to use only with nodejs Version 14.21.3 ``` npm install -g --unsafe-perm @frangoteam/fuxa fuxa ``` Or [Download the latest release](https://github.com/frangoteam/FUXA/releases) and unpack it (second option) ``` cd ./server npm install npm start ``` Or in linux running from docker (third option) ``` docker pull frangoteam/fuxa:latest docker run -d -p 1881:1881 frangoteam/fuxa:latest // persistent storage of application data (project), daq (tags history), logs and images (resource) docker run -d -p 1881:1881 -v fuxa_appdata:/usr/src/app/FUXA/server/_appdata -v fuxa_db:/usr/src/app/FUXA/server/_db -v fuxa_logs:/usr/src/app/FUXA/server/_logs -v fuxa_images:/usr/src/app/FUXA/server/_images frangoteam/fuxa:latest ``` Open up a browser (better Chrome) and navigate to http://localhost:1881 ## Usage Look the guide in [wiki](https://github.com/frangoteam/FUXA/wiki) pages ## To Debug (Full Stack) Install and start to serve the frontend ``` cd ./client npm install npm start ``` Start the Server and Client (Browser) in Debug Mode ``` In vscode: Debug ‘Server & Client’ ``` ## To Build Build the frontend for production ``` cd ./client ng build --prod ``` ## Contributing Any contributions you make are greatly appreciated. If you identify any errors, or have an idea for an improvement, please open an [issue](/../../issues). But before filing a new issue, please look through already existing issues. Search open and closed issues first. ### Pull-Requests If you want to raise a pull-request with a new feature, or a refactoring of existing code please first open an issue explaining the problem. ``` 1. Fork the Project 2. Create your Feature Branch (git checkout -b feature/AmazingFeature) 3. Commit your Changes (git commit -m 'Add some AmazingFeature') 4. Push to the Branch (git push origin feature/AmazingFeature) 5. Open a Pull Request ``` ### Coding standards Please ensure you follow the coding standards used through-out the existing code base. Some basic rules include: - Indent with 4-spaces, no tabs. - Opening brace on same line as if/for/function and so on, closing brace on its own line. ## Let us know! We’d be really happy if you send us your own shapes in order to collect a library to share it with others. Just send an email to 4frango@gmail.com and do let us know if you have any questions or suggestions regarding our work. ## ## License MIT.