Creating a Safe Website

Hello guys, wanna build a safe website, but can’t get the right folder structure I think. Followed the tutorial on How to develop for the SAFE Network (draft) developing a SAFE website. Created a new Folder and used the commands stated in the tutorial. I have to say I dont use gulp because I wanna hold it as simple as possible.

My folder Structure is as follows:

AppFolder
   build  (created by myself, not stated in the tutorial)
     css
     js
     index.html
   node_modules
   index.html  (created by myself, not stated in the tutorial) 
   index.js
   package-lock.json
   package.json
   README.txt
   yarn.lock

If I use the command “run index” the website loads endlessly. Hope someone could help me with this.

Best regards

1 Like

Please guys, anyone? I wanna build a Safe website from scratch and I want it to be as simple as possible in the beginning. Only the files I do not come around. Like index.html, index.js, css and js files. If I do it like so the page loads forever and the js and css files dont get loaded.

Edit: The js and css files get loaded but the page is always loading. Seems wrong to me.

Hello,

I’m not sure if it will help, but you could look at Safe-todo-draw.
Ok, it uses Vue.js (MVC ‘layer’), but I’ve also tried to keep it simple.
When testing I also don’t use gulp, but ‘python3 -m http.server 8000’ (on Linux), started in dir of index.html. Then start ‘NODE_ENV=dev Peruse-…-Dev’ and go there to ‘localhost://p:8000’.
It doesn’t have to be 8000 of course.

Thanks for your answer but I wanna try it as described in the tutorial. I think it’s a pity that there is no good guide to build on.

1 Like

Did you check the DevHub?

https://hub.safedev.org/platform/web/

1 Like

Thank you, checked that already but I am a little bit confused. What should I take now to develope a Web App? “SAFE Web App quick start” or “Safe Web api playground” ?

1 Like

Edit: Sry got it, it works now!

4 Likes