Help getting App onto Network!

Hi!

I’ve made a very simple index and search app based on the old web app tutorial, but I’m needing a bit of help getting it onto the proper (alpha 2) network.

I’ve uploaded the files easily enough using WHM, but I’m not quite sure how to CD into the SAFE directory and if I can just use NPM install/run when I do.

If it helps, or anyone’s interested, the github link is here, and the ‘app’ is actually made up of 3 apps, with ‘Admin’ needing to be run first. I’ll be an adding a Read Me in due course.

Bit of a dumb question sorry, but thanks in advance!

David

4 Likes

Hey @David-B!

Not a dumb question at all.

First thing I should point out, is that you cannot run commands on SAFE. you can upload the compiled HTML files, but you cant upload the project and then run npm ‘on the network’, for example. The safe network only serves static HTML (though you can do dynamic things with it, via single page apps and network data manipulation.

It’s also worth pointing out, that while Alpha 2 still exists, it’s not the cutting edge. Indeed, after adding in new data types we’ve a new shared vault setup, and this new vault and it’s new (current POC) browser have different APIs / data types and possibilities. So it’s worth reading up on that. It may require some tweaks to your code (sorry about that), but in the long run the new APIs we’re working on should help simplify web apps in general!

7 Likes

Thanks Josh!

So the idea would be that I do something like npm run-build on my own machine, which gives me a file I can upload to the network? I was having a bit of trouble with the build (even though everything is running fine,) but hopefully shouldn’t be anything I can’t sort out by double checking or re-initializing the projects.

One of the parts of the app is a multi-page thing using Vue router. Is that likely to be a no-go?

I’ve been following the progress of the new data types and APIs, but was keen to see the process through from start to finish, to overcome obstacles such as this one! I’m starting from nothing, so a lot of the learning I’m having to do hasn’t even been connected to SAFE as such.

The actual connections to the network are very simple in this app, so hopefully shouldn’t be too much work to adapt when the new APIs are done.

3 Likes

I don’t know Vue but this is a common requirement so it should be possible. There are promising hits when searching the web for “static website Vue router” so take a look there, and also at related topics in this forum (static frameworks / Vue), and @folaht may be able to help as he’s worked with Vue.

Good luck, and please add info about using Vue to the following topic if you learn any useful stuff:

2 Likes

Thanks Mark,

I’ve got the single page apps up and running, and the multi-page one looks like it should be ok in theory, but having a few teething troubles cos my CSS files were arranged in a way that doesn’t seem to translate too well to the built app, so I’ll have to look into that and fix it.

Will certainly try and document what I’ve learned along the way.

Looks like the issue of search is being solved over on the main forum just now anyway, so hopefully my app will be superfluous by the time it finally sees the light of day!

1 Like

That’s great David, hope you get the CSS sorted. I look forward to seeing this. Search is a hard problem, so I think you have plenty of time. :wink:

1 Like

Managed to get my app up there and working finally, thanks for the help all!

Few little UI/UX issues, but just things I’ll chip away at over time. eg. main thing slowing up loading seems to be Authorise and Connect function, so maybe I’ll have to design apps in future to avoid having to do that too many times, or maybe performance on that part of network will improve, I don’t really know how it works!

Going to update github and post on main forum, but got a busy few days coming up so unlikely for a little while, but meanwhile if anyone wants a look, the app is running, and pre-loaded it with the list of sites on the main forum (feel free to edit details or add a site I’ve missed!)

safe://search.safeindex

2 Likes

Favorite site on Alpha 2. That and dweb. Nice work so far!

2 Likes

Thanks Nigel!

I’ll probably do a bit more of a project plan as part of the readme on github, or post on the main forum. Not 100% how to approach things as it’s obviously only ever going to be a temporary thing, but at the same time is immediately quite useful, and a good way of learning, and potentially even creating a sort of template workflow for as decentralised of a search service as possible.

18 months ago, I tried alpha 2 out and naively typed ‘jams’ into the address bar, so it’s an improvement on that situation anyway!

The design, as far as it exists, is inspired by the first 2 Neu! album sleeves, but I might well change it quite a lot for the next version.

2 Likes

:+1: thanks Nigel

@nigel @david-b If either of you fancy writing a post for safe://dweb Blog (also at dweb.happybeing.com for anyone not familiar) let me know. It has a theme that I think both your projects would fit into well.

2 Likes

Hi Mark,

Writing is one the things I find easier in life, so I’d certainly be up for that. Did you have anything in mind that would be a useful focus?

Like I say, really busy just now, but should be able to do something next week.

I’m open to ideas so don’t feel restricted, but the theme I’m following at the moment is showing people what can be done, how to do it, or explaining why (e.g. why put Solid on SAFE is something I’m writing). So anything like that about SAFE. So you could do something about your app, maybe show what it does, or how it works etc. Today I was thinking it would be useful to have a step-by-step guide to setting up Fleming and using the new SAFE Browser.

I also have a post of my own which needs proof reading by someone, so let me know if you are up for that.