Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use TypeScript to turn on a small air conditioner in Linux

Shulou Source: shulou.com Published: 2022-06-01 07:41:12 10月04日 Update

This article introduces how to use TypeScript to turn on a small air conditioner in Linux. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

See a very interesting TypeScript project on Github. The hot summer is coming soon. I hope it will cheer you up and double your productivity.

Build NodeJs environment by Linux

Linux installs NodeJs and Npm. Download NodeJs's Linux installation package from the https://nodejs.org/zh-cn/download/ page:

$wget https://nodejs.org/dist/v14.16.0/node-v14.16.0-linux-x64.tar.xz $tar xvf node-v14.16.0-linux-x64.tar.xz $mv node-v14.16.0-linux-x64 / usr/local/node

Create a soft connection

$cd / usr/bin $ln-s / usr/local/node/bin/node node $ln-s / usr/local/node/bin/npm npm

Enter the command node-v _ NPM-v to check whether the installation is successful

Cnpm may be required in China. Install it as needed.

$npm install-g cnpm-- registry= https://registry.npm.taobao.org $cd / usr/bin $ln-s / usr/local/node/lib/node_modules/cnpm/bin/cnpm cnpm $npm install npm run build & npm run start download the TypeScript project $git clone https://github.com/YunYouJun/air-conditioner

Run the TS project

Centos releases port 3000 of npm

$firewall-cmd-zone=public-add-port=3000/tcp-permanent $firewall-cmd-reload

Enter the project directory and use npm to install dependencies

$cd air-conditioner/ $npm install

Run the project using npm or cnpm

$npm start

Or

Cnpm run start

Picture surprise is coming, please put on headphones and click the air conditioner switch button to feel the cool breeze he brings you. Access effect: https://kt.web.vg

On how to use TypeScript in Linux to open a small air conditioner to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Project air conditioner home use content more help run good fun surprise success interest cool breeze commands pictures summer guys buddies buttons effects Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei vpn macOS Shulou Technology Shulou Information