在此之前和这里,我都托管过静态站点;
totp(_,_,_,0) ->
{ok, not_found};
totp(Secret,Goal,Ctr,Stop) ->
Msg = binary:encode_unsigned(Ctr),
Bin = <<0:((8-size(Msg))*8),Msg/binary>>,
Hash = crypto:hmac(sha, Secret, Bin),
Offset = 16#0f band binary:at(Hash,19),
<<_:Offset/binary, THash:4/binary, _/binary>> = Hash,
Code = (binary:decode_unsigned(THash) band 16#7fffffff) rem 1000000,
if Code =:= Goal ->
{ok, {offset, 2880 - Stop}};
true ->
totp(Secret,Goal,Ctr+1,Stop-1) %% Did another run with Ctr-1
end.
,HTML
,CSS
个文件但是现在我开始使用JavaScript
进行后端开发,并将Nodejs
用于数据库。
我目前正在Mongodb
上运行Mongodb
数据库。
在托管网站时,我是否遵循与以前相同的步骤,或者我必须做些不同的事情吗?
(我认为这是不同的,但是我不知道如何处理)