-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
1. Environment
-
Node.js
Server will run in port 3000 (i.e.
localhost:3000) -
MongoDB
完全使用默认配置
- 保证 MongoDB daemon 运行在 port 27017
- 不设置数据库用户名、密码
- 运行 server 后,会自动创建名为
note_squared的数据库,可使用MongoDB Compass查看
2. Run Server
cd /note-squared/server
# 安装依赖
npm install
# 使用 nodemon 运行 server(如果修改 server 代码,会自动 restart)
npm run dev
# OR 使用以下命令(如果修改 server 代码,不会自动 restart)
npm run start3. 其他注意事项
-
如何获得一个带有 admin 权限的账号?
现在无法直接注册带有 admin 权限的账号了,需要手动修改数据库: users => role,手动改为
admin/normal
-
注册时,需要验证邮箱吗?
目前调用获取邮箱验证码的API后,验证码会直接返回给前端,所以即使填了假邮箱也没事。
如果需要测试邮件是否真的能发送,找到
server/app/router/user/register_emailVerificationCode.js文件中以下代码:// send verification email // (temporarily removed) //await nodemailer.sendVerificationCode(_email, _email, _verificationCode)
删掉最后一行的注释即可。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
