Entrance Events! Chat Gallery Search Everyone Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
February 23, 2025 - @661.55 (what is this?)
Activity rating: Three Stars Posts & Arts: 32/1k.beats ~ Boop! The forum will close in 339.beats! Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts Start New Topic  Submit Art
News: :happy:  :pc: There are community newsletters here! :pc: :happy: Super News: E-Zine #3 Accepting Entries!

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  making website store things


« previous next »
Pages: [1] Print
Author Topic: making website store things  (Read 68 times)
brightbluebug
Casual Poster
*

⛺︎ My Room

View Profile

Joined 2024!
« on: February 22, 2025 @185.58 »

hello. i want to make a website where people can essentially vote on various images, and the website stores this and displays the average stuff whatever. wondering how to do this? much thanks.
Logged
futurearcana
Casual Poster ⚓︎
*


he/him

⛺︎ My Room
XMPP: Chat!

View Profile WWWArt

Joined 2025!
« Reply #1 on: February 22, 2025 @403.48 »

You need a backend, a piece of software that runs on a server and communicates with your website (the piece that runs in the browser is called a frontend).

I don't know how much of this will go over your head, but the general idea is: your backend is an http server, that exposes API calls: basically functions you can run by invoking them from the frontend. They would usually return json data that you can then parse in js in your frontend and display it.

A partial simple example for a polls backend API structure would be something like this:

  • GET /polls: returns a list of all polls
  • GET /polls?status={active|inactive}: returns a list of all active/inactive polls
  • GET /polls/123: returns the poll with id 123
  • PUT /polls/123?vote=2: vote on poll 123, with choice number 2

And then other authenticated API calls that only an admin can run to create, delete and close polls.

You could also want to limit access to these APIs by IP for example, so that the same person cannot vote twice. Of course using the IP has limitations, but there are alternatives, including requiring user registration.

The data would need to be stored in a database that your backend will need to communicate with to persist all of this data.

You would also need to think about security since this would need to be hosted on the public internet you want to make sure it's secure.

For user security you would also likely need to add an SSL certificate to enable https. Usually you do this by serving your backend through a reverse proxy like nginx.



To summarize, this sounds like an easy thing to do, particularly considering how easy it is to create a static backend-less frontend, but in reality it involves creating a full on application.

It's definitely not hard per se, and honestly if you're interested I'd encourage you to learn how to do this cause it's a lot of fun, but it's absolutely not on the same level of difficulty as creating your first neocities website.
Logged

Come sweet slumber, enshroud me in thine purple cloak
brightbluebug
Casual Poster
*

⛺︎ My Room

View Profile

Joined 2024!
« Reply #2 on: February 22, 2025 @842.95 »

@futurearcana sweet thanks for the help! is hosting (hosting?) a backend doable on neocities, or would i have to figure something else out? where would you recommend i start with this?
Logged
futurearcana
Casual Poster ⚓︎
*


he/him

⛺︎ My Room
XMPP: Chat!

View Profile WWWArt

Joined 2025!
« Reply #3 on: February 22, 2025 @924.49 »

You cannot host a backend on neocities, you need a full on server, likely with ssh access.

You can host it in your home if your ISP allows it. If so a raspberry pi is perfectly capable. The downside is that you'd expose your home IP.

You can also rent Virtual Private Servers (VPS's for short) for fairly cheap, some providers like ovh can get you started with less than 5$/month.

This said, start by learning how to write the actual software. You can use whatever language you prefer, my personal suggestions are node (javascript) with fastify; or python with fastapi, flask or django.

For the database sqlite should be perfectly fine for your needs and avoids a lot of extra fanaggling.

You can write the software and try it locally on your computer, while making the frontend still running on your local machine talk with it.

Also, I highly suggest developing and running all of this on linux, so get familiar with that as well. This is because 99.999% of servers out there run linux, and if you want to rent a windows server/vps it costs a lot more without any benefit (it is in fact highly undesirable to have a server running windows).

Once you got everything set up and working well, you can rent a vps or buy a raspberry pi and host it publicly, with a domain name and an ssl key from let's encrypt and all that.
Logged

Come sweet slumber, enshroud me in thine purple cloak
Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

Website size

Started by RolyBoard ✁ ∙ Web Crafting

Replies: 66
Views: 10468
Last post February 14, 2025 @901.75
by crazyroostereye
Things you've overheard?

Started by DoctorScreechBoard ⚚ ∙ Life on Earth!

Replies: 17
Views: 3376
Last post November 12, 2024 @237.99
by pixiez
I am new to making sites and I want some tips to improve.

Started by Icey!Board ☔︎ ∙ I need Help!

Replies: 4
Views: 2381
Last post December 14, 2021 @853.48
by Icey!

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi