[英]How to save my Nodejs BLockchain
In the last few weeks, I tried to code my own Blockchain, just to understand the whole concept better. 在过去的几周里,我试图编写自己的区块链代码,只是为了更好地理解整个概念。 You can find my code here: https://github.com/Snixells/js-blockchain .
您可以在这里找到我的代码: https : //github.com/Snixells/js-blockchain 。
I already implemented that the Blockchain + Transactions are created through nodeJs arrays and JSON. 我已经实现了通过nodeJs数组和JSON创建Blockchain + Transactions The problem I am working on right now is that the data does not get saved.
我现在正在处理的问题是无法保存数据。 I want to run the whole blockchain on a (maybe) express server and access it by a RESTful API.
我想在(也许)快递服务器上运行整个区块链,并通过RESTful API访问它。 Because of that, I need a way to store the Blockchain somewhere.
因此,我需要一种将区块链存储在某处的方法。 I also have already some ideas but none of them seems like a good one.
我也已经有了一些主意,但似乎没有一个好主意。
I would love to hear some answers, for example, what frameworks and so on I could use. 我很想听听一些答案,例如,我可以使用什么框架等等。 Or maybe any ideas on how to store the database at all.
也许还有关于如何存储数据库的任何想法。 Thanks for your help :)
谢谢你的帮助 :)
Update: 更新:
I tried out rethinkDB and it seems to be a great choice because you can just simply store json objects in that database. 我尝试了rethinkDB,它似乎是一个不错的选择,因为您可以将json对象仅存储在该数据库中。 It's perfect for what I need!
完美满足我的需求!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.