Thursday, March 12, 2020

Twitter mandates labels for bots

Twitter updated its developer policy and issued a new rule – requiring the bots to have labels if they don’t want to be removed from the platform. Although the average user may not be aware of them, the use of bots is quite prevalent on Twitter. In fact, many developers have enlisted bots on...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Saima Salim via Digital Information World

Google Search Gets a PDF Upgrade

PDFs are very important because of the fact that they allow us to view a lot of documents in a way that is much easier to digest than what would be the case with word documents not to mention the fact that it would allow the dissemination of information without easily allowing the alteration of...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Zia Muhammad via Digital Information World

Just in: TikTok to update its app with a bunch of new features

According to social media consultant and news breaker, Matt Navarra, TikTokers can expect a few new features soon as the makers put them on the test. Navarra posted his findings from his official Twitter account and shared screenshots as well. The most prominent feature that we can soon see on...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Saima Salim via Digital Information World

Counter Style 107

The post Counter Style 107 appeared first on Best jQuery.


by Admin via Best jQuery

Product Grid Style 113

The post Product Grid Style 113 appeared first on Best jQuery.


by Admin via Best jQuery

Unspun

Unspun
Unspun creates custom-fit, size free jeans. Their mission is to reduce global waste and the environmental impact of the denim industry.
by via Awwwards - Sites of the day

Quick Tip: Configuring NGINX and SSL with Node.js

Quick Tip: Configuring NGINX and SSL with Node.js

NGINX is a high-performance HTTP server as well as a reverse proxy. Unlike traditional servers, NGINX follows an event-driven, asynchronous architecture. As a result, the memory footprint is low and performance is high. If you’re running a Node.js-based web app, you should seriously consider using NGINX as a reverse proxy.

NGINX can be very efficient in serving static assets. For all other requests, it will talk to your Node.js back end and send the response to the client. In this tutorial, we’ll discuss how to configure NGINX to work with Node.js. We’ll also see how to setup SSL in the NGINX server.

Note: Node also has a built-in HTTPS module and can be configured to read the necessary certificate files without the need for a reverse proxy. You can find out more about this in our article How to Use SSL/TLS with Node.js.

Installing NGINX

Assuming you already have Node.js installed on your machine (if not, check here), let’s see how to install NGINX.

Installation on Linux

If you’re running Ubuntu, you can use the following command to install NGINX:

sudo apt-get update
sudo apt-get install nginx

If you’re running a Linux distro other than Ubuntu, check out the NGINX installation docs for more information.

NGINX will start automatically once it’s installed.

Installation on macOS

If you’re on macOS, you can use Homebrew to install NGINX easily. The steps are as following:

  • Homebrew needs the directory /usr/local to be chown’d to your username. So, run the following command in terminal first:

    sudo chown -R 'username here' /usr/local
    
  • Now the following two commands will install NGINX on your system:

    brew link pcre
    brew install nginx
    
  • Once the installation is complete, you can type the following command to start NGINX:

    sudo nginx
    
  • The NGINX config file can be found here: /usr/local/etc/nginx/nginx.conf.

Installation on Windows

For Windows, head over to the NGINX downloads page and get the zip. The next step is unzipping the archive and moving to the directory in the command prompt as follows:

unzip nginx-1.3.13.zip
cd nginx-1.3.13
start nginx

As you can see, the command start nginx will start NGINX.

Now that the installation is done, let’s see how you can configure a simple server.

Setting Up a Node.js Server

First, let’s create a simple Node.js server. We’ll start by initiating a project and installing the Express package:

mkdir node-demo && cd node-demo
npm init -y
npm i express

Create a file called server.js, with the following contents:

const express = require('express')
const app = express()
const port = 3000

app.get('/', (req, res) => res.send('Hello World!'))

app.listen(port, () => console.log(`Example app listening on port ${port}!`))

You can start the server by running node server.js.

The post Quick Tip: Configuring NGINX and SSL with Node.js appeared first on SitePoint.


by Nilson Jacques via SitePoint