oneclickdapp / oneclickdapp-v1

:zap::wrench::link: :shipit: Instantly build a dApp with a simple URL to bookmark or share with a friend.
http://OneClickdApp.com
MIT License
254 stars 69 forks source link

Given ABI UI, generate new sub-page with ABI UI using node and direct user there #5

Closed cupOJoseph closed 6 years ago

cupOJoseph commented 6 years ago

Something like

`//When a user submits a form, create a new page app.post('/submit', urlencodedParser, function(req, res){
var nom = req.body.nom; / save nom to database / res.redirect('http://myDomain/' + nom); });

app.get('/:nom', function(req, res){ / if nom exists in database -> return ejs template with vars / / else return 404 / });`

pi0neerpat commented 6 years ago

Planning on using this https://stackoverflow.com/questions/1201258/how-to-get-a-subdomain-using-window-location

anubhavsa commented 6 years ago

I'll try this.