blob: 6d73b9240094ff40cbae9b0d07c3a5745bba4a4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package main
// ideez is a web application that allows people to post their ideas, it is meant to help
// brainstorming.
// ToDo's
// - [ ] htmx or websockets
// - [ ] (server.go): update version number because data file is not compatible anymore
// - [ ] change name for server
// - [ ] use a hash instead of random hexes
// - [ ] create a module and a program
// - [x] change logger inside Ideez
// - [x] change og: properties for ideas.html
// - [x] import functionality for servers by walking the ideez_servers directory
// - [x] (server.go): fix cancel on edit
// - [x] pass mux to newServer, so we don't need to create 2
// - [x] change CreatedAt to be Last Updated
// - [x] edit a post
// - [x] Store ideas to a file (encoder/gob)
// - [x] Change the date format printing
// - [x] outsource removing the posts to a separate cli tool
// - [x] Add a post
// - [x] Remove a post
// - [x] Create a Server out of this so you can run multiple instances
// - [x] check redirects
// testing:
// - test for incompatible versions
// - test all routes
// - test importing
// Every server is accessible at /server/ID, then all the routes should apply with these as the "root"
// route. eg. /server/ID/idea/edit
//
// When init server we
// - associate DataFilename with the ID
// - start it on the required address
// - append the id and process to a list
// - use the ID to create a path on which it will be served
// - the newServer() function returns a handler that we can associate with a route
|