Mah*_*loo 4 database heroku node.js nedb
我在我的 nodejs 应用程序中使用了 nedb,我的第一个代码是:
var Datastore = require('nedb');
var db = new Datastore({ filename: 'users.db', autoload: true });
db.persistence.setAutocompactionInterval(5);
Run Code Online (Sandbox Code Playgroud)
本地主机一切正常,数据库将在我的 db 文件中保存每一个厚。(服务器重启后保存的数据库)但在heroku服务器中,数据库为空!!!我认为数据库保存在内存中!(不在我的数据库文件中!!)为什么?!我想将我的数据库保存在 Heroku 服务器的 db 文件中!
| 归档时间: |
|
| 查看次数: |
1108 次 |
| 最近记录: |