Websocket clock server web interface written in ReactJS/TypeScript
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
Yann Weber 93bd1e138a Initial commit 3 年前
public Initial commit 3 年前
src Initial commit 3 年前
.gitignore Initial commit 3 年前
README.md Initial commit 3 年前
config.json Initial commit 3 年前
package.json Initial commit 3 年前
tsconfig.json Initial commit 3 年前

README.md

Clock websocket React/TS UI

Deployment

Configure & build

Install dependencies npm install

Change the WS_URL value according to server deployment configuration. edit src/config.json

Create an optimized production build npm run build

Copy ./build to webserver’s (/var/www/clock).

Nginx webserver configuration

Install nginx apt install nginx

Create server configuration

rm /etc/nginx/site-enabled/default
edit /etc/nginx/sites-available/clock
ln -s /etc/nginx/sites-available/clock /etc/nginx/sites-enabled/

Example server config :

server {
	listen 80 default_server;
	listen [::]:80 default_server;

	root /var/www/clock/;

	index index.html;

	server_name _;

	location / {
		try_files $uri $uri/ =404;
	}
}

Start a development server

npm run start