Redirect non-www to www in nginx

From DevOps Notebook
server {
    listen 80;
    server_name devopsnotebook.com;
    return 301 $scheme://www.devopsnotebook.com$request_uri;
}