admin管理员组文章数量:1430742
Is it possible to not run the actual code on firebase database while development by firing up a local instance and developing using that, like we do for other mongodb and mysql databases?
Is it possible to not run the actual code on firebase database while development by firing up a local instance and developing using that, like we do for other mongodb and mysql databases?
Share Improve this question asked Jul 23, 2017 at 12:11 Shiven SinhaShiven Sinha 6966 silver badges15 bronze badges2 Answers
Reset to default 2You can try this module firebase-server
I built an open-source project called firebase-server to implement end-to-end tests in my own application. With firebase-server, my end-to-end tests are now running 40% faster and I no longer depend on an Internet connection for running the tests in development.
Firebase Web Socket Protocol Server. Useful for emulating the Firebase server in tests.
var FirebaseServer = require('firebase-server');
new FirebaseServer(5000, 'localhost.firebaseio.test', {
states: {
CA: 'California',
AL: 'Alabama',
KY: 'Kentucky'
}
});
client side
var client = new Firebase('ws://localhost.firebaseio.test:5000');
client.on('value', function(snap) {
console.log('Got value: ', snap.val());
});
For more details end-to-end-testing-with-firebase-server
firebase-local-development-and-testing-in-angularfire
You can use the Firebase Local Emulator Suite:
The Firebase Local Emulator Suite is a set of advanced tools for developers looking to build and test apps locally using Cloud Firestore, Realtime Database, Cloud Functions, Cloud Pub/Sub and Firebase Hosting.
本文标签: javascriptCan I run a local version of firebase database for development purposesStack Overflow
版权声明:本文标题:javascript - Can I run a local version of firebase database for development purposes? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745527777a2661916.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论