Can I use npm install web3 if I’m not using node.js? I just have a folder with index.html and main.js and I’m wondering how I can get web3 to work in there..
Apr 12, 2020, 2:21 PM
Npm is a package manager for node.js
You are unable to use this command without install node
Apr 12, 2020, 2:36 PM
Do I have to use node.js to use web3?
Apr 12, 2020, 2:37 PM
It depends on what kind of implementation would you like to use, web3.js or web3.py.
For the last one you need python
Apr 12, 2020, 2:38 PM
I see
What if I’m trying to build a simple HTML/Javascript 1 pager. How do I get this to interact with my smart contract without using node.js?
Or would you recommend just using node.js? I’m a beginner programmer so I prefer keeping it simple, and I’m not familiar with node.js
Apr 12, 2020, 2:39 PM
Install node
Then install truffle framework
For frontend react drizzle
Follow the tutorials
And read the docs
Apr 12, 2020, 2:43 PM
I have tried many tutorials and read most of the docs, but it’s impossible without any coding experience imo
So I plan to start from scratch, did some JS/HTML tutorial
And I would like to just render a simple html button that gets an integer from my smart contract
But apparently I need to install node and use a webpack and all kinds of things I don’t understand
Apr 12, 2020, 2:44 PM
You don't need all that, you can do just fine it you want to achieve this
Read the web3 object from window directly window.web3 and use it to read the data from contract
Apr 12, 2020, 2:55 PM
Thanks Abhi, can you redirect me to some links where they go in to detail about that?
Apr 12, 2020, 2:57 PM