Author

Topic: Any faucets created with AngularJS? (Read 992 times)

full member
Activity: 238
Merit: 100
June 20, 2015, 10:58:45 PM
#10
I just started working with angular for another project of mine.

As others have said you would need to create the backend first which would be far more complicated than the angular.js frontend, Node.js would be the best bet if you wanted to avoid PHP and already know javascript. I remember seeing a couple of open source Javascript faucets that you could probably audit and convert to a Node.js backend with some work.

As far as a database is concerned being that you are handeling currency my suggestion for a nosql db would be Redis or CouchDB, Avoid MongoDB for something like this.

Thinking about going with Redis. Thanks for the help, really appreciate it! To you, and to everyone.
full member
Activity: 238
Merit: 100
June 20, 2015, 10:57:42 PM
#9
You would still require a server-side language to be able to access a database. AngularJS is a frontend library. I don't understand the "PHP is old" complaint. Obviously, you should use the best tool for the job. Other server-side options available include Ruby, Python or Node.js. Node.js is relatively new so that may be right up your alley.

Haha yeah, I'm focusing on learning Node.js. I'm not complaining about PHP, i just want to invest more time learning something that will be solid in the future. I already know a bit about PHP but it feels old now haha. Cheesy

Cheers!
hero member
Activity: 750
Merit: 500
June 20, 2015, 09:56:11 PM
#8
I just started working with angular for another project of mine.

As others have said you would need to create the backend first which would be far more complicated than the angular.js frontend, Node.js would be the best bet if you wanted to avoid PHP and already know javascript. I remember seeing a couple of open source Javascript faucets that you could probably audit and convert to a Node.js backend with some work.

As far as a database is concerned being that you are handeling currency my suggestion for a nosql db would be Redis or CouchDB, Avoid MongoDB for something like this.
legendary
Activity: 1456
Merit: 1018
HoneybadgerOfMoney.com Weed4bitcoin.com
June 20, 2015, 12:51:49 PM
#7
Ask why use angular? -> you would probably want to create a new age sort of faucet - one with a game attached that gives away satoshis based on the high score...turn it around and deliver ad content within the frame on the same window.  That's a method to use Angular in a different way that acts as a faucet.

Probably use Node.js in conjunction with angular so you can have an end to end js solution.  I've not built a faucet myself but I have enough of an idea of how everything together works:

User sets aside a budget  that they can earn/give away through ads vs satoshis donated.

Set up a page with the ad content as well as a captcha and an input field -

Using your DB (php would have likely used mysql, you could probably get away with a flat file implementation using redis) you would run a stored procedure to a) check if account exists based on wallet address - then depending on your method - you either run a tallied balance on the users wallet balance - probably through instantiating a session cookie which saves the entered wallet address - so that each time your user clicks - pay, their balance increases incrementally on your end, but you're not actually paying anything, just accumulating a payout balance.  When the user clicks withdraw, your implementation has a 2nd stored procedure that checks the balance available on the users account, the available balance via bitcoind rpc call and then fires the payout transaction, 1 time, to the address stored on the account record in the db.  If you're using the manual quick and dirty method - you just payout 0 fee transactions, immediately, on pay.  I say quick/dirty, because those are dust transactions and if a users accumulates several of these transactions, they may be unable to spend the earned BTC due to trx size (larger than 1.2 KB)

Angular is definitely a Front End Framework and would be great for presenting realtime data or perhaps for working w/ websockets to give realtime info on the network and perhaps integrate that into an entertainment form factor. 
sr. member
Activity: 266
Merit: 250
June 20, 2015, 11:51:16 AM
#6
You would still require a server-side language to be able to access a database. AngularJS is a frontend library. I don't understand the "PHP is old" complaint. Obviously, you should use the best tool for the job. Other server-side options available include Ruby, Python or Node.js. Node.js is relatively new so that may be right up your alley.
tyz
legendary
Activity: 3360
Merit: 1533
June 19, 2015, 02:44:20 PM
#5
Yeap, you are right. You can not directly access database with angularjs. You can only perform REST commands. But there are SAAS providers which provide the ready-to-use backend for you. So, you can fully focus on frontend development.

As far as I understand you will still need a server side script (php) in order to access your database.

 http://www.w3schools.com/angular/angular_sql.asp
http://stackoverflow.com/questions/25422821/is-it-possible-to-write-mysql-queries-in-angular-js

legendary
Activity: 1442
Merit: 1186
June 18, 2015, 07:09:53 PM
#4
As far as I understand you will still need a server side script (php) in order to access your database.

 http://www.w3schools.com/angular/angular_sql.asp
http://stackoverflow.com/questions/25422821/is-it-possible-to-write-mysql-queries-in-angular-js
full member
Activity: 238
Merit: 100
June 18, 2015, 05:10:45 PM
#3
This is weird, I just stumbled upon AngularJS yesterday and thought it'd be good to create some kind of bitcoin app/website.

Haha yeah. I've actually been with it since the beggining, and now it's grown so big.
Really wanna create something related to bitcoin with it.
sr. member
Activity: 344
Merit: 250
Feed me btc ^
June 18, 2015, 05:04:07 PM
#2
This is weird, I just stumbled upon AngularJS yesterday and thought it'd be good to create some kind of bitcoin app/website.
full member
Activity: 238
Merit: 100
June 18, 2015, 03:21:53 PM
#1
Do you guys know of any faucets created with Angular?
The majority of them are all PHP, and well... PHP is getting old.

I'm thinking of creating a faucet with Angular so people can see their stats live from the db and automatically updates.
Also thinking of increased faucet payouts, for more frequent users.

Want some inspiration but haven't found any?
Jump to: