-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ANNOUNCEMENT] wenyan Snippet Site #472
Comments
You are on fire! Very cool! |
For the storage, I think we can consider Firebase Pros:
Cons:
I have some experience with Firebase. If you find it useful, I can help to integrate it. Can gltich linked to Github repo? If so, it allows people to better improve it by making PRs. |
Thanks! |
Yes. Definitely. And for the static site hosting, I would recommend Netlify. It's basic works the same as Github pages but with CI/CD toolings. It can build and publish sites along with commits. You don't need to build them manually anymore.
If we do use Netlify or Github Pages, then the problem won't bother anymore 😄
Maybe I could start a repo for this and made a POC. If it works perfect, then we can merge into this repo. What do you think? |
Sounds good, Firebase+Netlify it is!
👍, Thanks so much! |
I want to say MogoDB , as document based database, seems also suitable for saving code snippet. And the document is just appeared as JSON, so familiar... |
@LingDong- Ah, I just realize that Firebase is not accessible in China. Maybe we should reconsider that. (although I think I made some good progress) 😢 |
This is very unfortunate. I was going to suggest Heroku as an alternative, but apparently that is blocked too according to http://www.chinafirewalltest.com/. Apparently we might get around with proxy or doing some trick with DNS record. If we want to do that, I already own a couple of domains that we can use, (including wy-lang.org btw, which I'm thinking about migrating to when we have more pages). Otherwise I think DigitalOcean or AWS might be alternatives, though I'm not sure if they're as convenient or if we have to manage our own database. |
The firebase proxy looks promising! Will be back in China next week, and I gonna try it out if I got some time.
For me, I would not recommend this approach. Managing a VPS brings too much complexity for this use case and a paid service won't be a good choice as an open-source project in the long term. Hope the hacks work. |
I prefer to use github to make a snippet site. |
I can’t see the snippets (but not the searching bar) when I view on my iPad. |
Just test out, glitch.me seems to be blocked for some reason. Can you try it out thought VPN? |
@LingDong- Yes, it's accessible. But somehow |
In order to track down the problem, I added a couple of lines give api to download the sqlite database directly:
Wonder if this works? Code: app.get("/db", (request, response) => {
response.sendFile(`${__dirname}/data/wy-snippets.db`)
}) |
Hmm.. then perhaps |
Indeed. And maybe paginations? |
Or perhaps when you scroll down, more loads? So internally there is some kind of pagination, but for users it feels like a continuous scroll? Also, I'm wondering, if |
Sounds good to me
Yes that's the wired part. And technically requesting thought VPN will be a little bit slower than bare request, but not in this case. So I assumed there was something blocked. Wonder if this is only me. Would like to see more feedbacks from other users. |
I mean, I can’t see any snippets.------------------ 原始邮件 ------------------
发件人: "Anthony Fu"<[email protected]>
发送时间: 2020年2月8日(星期六) 晚上11:06
收件人: "wenyan-lang/wenyan"<[email protected]>;
抄送: "XingZiLong"<[email protected]>;"Comment"<[email protected]>;
主题: Re: [wenyan-lang/wenyan] [ANNOUNCEMENT] wenyan Snippet Site (#472)
I can’t see the snippets (but not the searching bar) when I view on my iPad.
Just test out, glitch.me seems to be blocked for some reason. Can you try it out thought VPN?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@xingzilong Just refresh the page (for several times). It works for me. |
As mentioned in #459, I'm building a website where people can create, edit, browse, share, fork, run, embed, like, dislike, etc., user-created snippets in wenyan language.
https://wenyan-snippets.glitch.me/
Currently I have a proof-of-concept that is running on free server from gltich.com. It uses sqlite to store user snippets. It is rough and susceptible to hacks, but is usable. If people are liking it we can build a bigger better, more secure version.
Please check it out and give feedback! If you have experience building sites like this, your help will be very much appreciated!
Creating Snippets
+
buttontoken
field on the top bar, this is like a secret password. Leave it aspublic
to allow anyone to edit the code. Press the shuffle icon to generate a random token. You'll need to remember the token so you can edit the snippet later.Editing/Forking Snippets
Compiling/Running
Submit/Publishing
Upvoting
+1
button on the lower left corner of a snippet to upvote it (or-1
to downvote it)Searching
by:AuthorNameHere
to search code by a particular author#id
to find snippet by its unique ID. (ID is shown on upper left corner of every snippet)Embedding
GET
a snippet with this url:https://wenyan-snippets.glitch.me/api?id=666
.Implementation Details
You can view the source code of the site with this URL:
https://glitch.com/edit/#!/wenyan-snippets
Caution
The site is still in its early stage, I'm sure there's a million ways to break it. Before you do that, please report it intead. Also, don't rely on the storage just yet, I'll try my best not to lose the programs, but can't guarentee that someday I won't accidentally nuke the SQL, so save your work elsewhere too :)
Again, feedback and help are most welcome! Thanks!
The text was updated successfully, but these errors were encountered: