2

I am trying to convert login.pug file to login.ejs file in node.js which contains below code.please help me how to convert below code into login.ejs

extends layout
block content  
div(id="root" style="width: 280px; margin: 40px auto; padding: 10px;")
script.
var lock = new Auth0Lock('#{env.AUTH0_CLIENT_ID}', '#{env.AUTH0_DOMAIN}', { 
auth: {
      redirectUrl: '#{env.AUTH0_CALLBACK_URL}'
    , responseType: 'code'
    , params: {
      scope: 'openid name email picture'
    }
  }});
lock.show();

login.ejs

<!DOCTYPE html>
<html lang="en">
<head>
<link rel='stylesheet' href='/stylesheets/bootstrap-theme.min.css' />
<link rel='stylesheet' href='/stylesheets/bootstrap.min.css' />
</head>
<body>
<div id="root" style="width: 280px; margin: 40px auto; padding: 10px;">
<%- include('layout') %>
</div>
<script src="/js/jquery-3.1.1.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>
<script type="text/javascript">
var lock = new Auth0Lock('#{env.AUTH0_CLIENT_ID}', '#{env.AUTH0_DOMAIN}', { 
auth: {
      redirectUrl: '#{env.AUTH0_CALLBACK_URL}'
    , responseType: 'code'
    , params: {
      scope: 'openid name email picture'
    }
  }});
lock.show();

Ry-
  • 218,210
  • 55
  • 464
  • 476
priyanka
  • 29
  • 3
  • So you tried converting it yourself and the output wasn’t what you expected, right? Can we see that attempt? – Ry- Apr 21 '17 at 06:51
  • Thanks for the response Ryan.Below answer is my attempt but its not working – priyanka Apr 21 '17 at 07:06

0 Answers0