Websocket clock server web interface written in ReactJS/TypeScript
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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