Kselax.ru

Hacker Kselax – the best hacker in the world

Menu
  • Blog
  • Contacts
  • wp plugin generator
  • English
    • Русский
Menu

Tag: graphql

Nginx

Posted on 20 January, 201924 June, 2019 by admin

Creating a server block for node.js create a directory

1
2
sudo mkdir -p /var/www/fl.com
sudo chown -R $USER:$USER /var/www/fl.com

  create a server block config file for fl.com

1
sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/fl.com

  add there is the next config /etc/nginx/sites-available/fl.com

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
upstream fl-com-app {
ip_hash;
server 127.0.0.1:3002;
}
 
server {
listen 443 ssl;
listen [::]:443 ssl;
include snippets/snakeoil.conf;
root /var/www/fl.com;
index index.html;
server_name fl.com www.fl.com;
location / {
proxy_pass http://fl-com-app;
}
}
 
server {
listen 80;
listen [::]:80;
server_name fl.com www.fl.com;
return 301 https://$host$request_uri;
}

create a symbolic link

1
sudo ln -s /etc/nginx/sites-available/fl.com /etc/nginx/sites-enabled/

  test configuration

1
sudo nginx -t

  then restart nginx

1
sudo systemctl restart nginx

  add the  fl.com to the /etc/hosts

1
127.0.0.1 fl.com

  Open in browser…

Read more
graphql

How to use graphql in node.js

Posted on 14 November, 201814 November, 2018 by admin

Graphql is a query language for an API link graphql.js documentation link It is usually used with express by using module express-graphql link The sense of using at first we create a schema and in a graphql language then we create a root this is a variable that has handlers for each element in a schema….

Read more

Categories

  • bash (1)
  • English (9)
  • JavaScript (4)
  • node.js (22)
  • photoshop (1)
  • php (3)
  • React (9)
  • sclerotic (6)
  • Ubuntu (10)
  • Uncategorized (13)
  • Wordpress (1)

Tags

Ajax apache2 automation bash chrome-extension command line editor ejs email English English-grammar framework functions git graphql handlebars hybrid app installation javascript js linux newbie node.js node.js javascript nodemailer npm objects Performance php phpmyadmin playonlinux promise rabbitmq React react-router redis reverse-proxy session shell socket.io sublime text 3 time zones ubuntu unity webpack

Recent Comments

  • damien on How to install npm and nodejs the latest versions on ubuntu
  • Cam on How to install npm and nodejs the latest versions on ubuntu
  • Pierre on socket.io with apache as a reverse proxy on the CentOS
  • admin on How to use react-router with a few languages
  • admin on How to install npm and nodejs the latest versions on ubuntu
©2021 Kselax.ru Theme by ThemeGiant