Savjee / SavjeeCoin

A simple blockchain in Javascript. For educational purposes only.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to connect with local host or database?

ssupgit opened this issue · comments

Dear Sir,

Thank you for this inspiring and cool example, but i've found difficulties to connect to database to my local host?
how to do it?
and pardon me..when i do commit git i commit here...how to commit to my own git...sorry in advance...

To store blocks in a database, you'll have to change the blockchain class. Every time it tries to access this.chain, you have to connect to your database and fetch blocks that way.

As for the git issue: you have to change the remote's URL. This will help you:
https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories#changing-a-remote-repositorys-url

There's not much more I can do for you. I'm not going to implement a database backend for this blockchain. It's only meant for educational purposes, not to be used in production in any way.

Hope you understand that I'm not going to take this on.
Maybe you can find someone else that is willing to help you build this system.