我正在学习Node.js,我的演示有两个文件:
/server.js/public/index.html/server.js将获得/public/index.html然后返回客户端.
我想nodemon在/public/index.html修改后自动重新加载.但是,它似乎nodemon仅在我修改时才起作用,/server.js而不是在/public/index.html修改时起作用.
我正在使用nodemon server.js启动服务器.
我按照这篇文章http://dev.office.com/code-samples-detail/2142和Ruby来获取用户的电子邮件地址.这是代码:
# Parses an ID token and returns the user's email
def get_email_from_id_token(id_token)
# JWT is in three parts, separated by a '.'
token_parts = id_token.split('.')
# Token content is in the second part
encoded_token = token_parts[1]
# It's base64, but may not be padded
# Fix padding so Base64 module can decode
leftovers = token_parts[1].length.modulo(4)
if leftovers == 2
encoded_token += '=='
elsif leftovers == 3
encoded_token += '='
end
# Base64 decode (urlsafe version)
decoded_token = …Run Code Online (Sandbox Code Playgroud)