../allredlib
Private library
Clone with
git clone git://git.awl.red/neallred/allredlib

allredlib📎

Allredlib

local dev📎

Reset DB📎

migrate migrate-down --files /allredlib/migrations --connection '/.allredlib.db' migrate migrate-up --files /allredlib/migrations --connection '/.allredlib.db'

UPDATE schema_migrations set dirty=false;

Run application server📎

pushd webapp
bun i
bun run build-static
popd 
go run cmd/server/main.go cmd/server/static.go

Create user📎

curl -X POST -d '{"username": "nn", "password": "password"}' http://localhost:8080/api/v1/user/signup curl -X POST -d '{"username": "nn", "password": "password"}' http://localhost:8080/api/v1/user/login curl --cookie "$ALLREDLIB_COOKIE" http://localhost:8080/api/v1/user/whoami

Promote user to admin (assuming roles are the same as in the migrations)📎

sqlite3 ~/.allredlib.db "INSERT INTO users_role (users_id, role_id, grantor_id) VALUES (1, (SELECT id FROM role WHERE role='SERVER_ADMIN'), 1);"

Create a GUI admin through the application server📎

TBD

Update graphql schema📎

go run github.com/99designs/gqlgen generate

.gitignore 1 year ago
README.md 1 year ago
cmd
migrate
main.go 1 year ago
server
main.go 1 year ago
static.go 1 year ago
dev
dev-seed.sql 1 year ago
go.mod 1 year ago
go.sum 1 year ago
gqlgen.yml 1 year ago
graph
generated.go 1 year ago
model
models_custom.go 1 year ago
models_gen.go 1 year ago
queries.go 1 year ago
resolver.go 1 year ago
schema.graphqls 1 year ago
schema.resolvers.go 1 year ago
str.go 1 year ago
logging
logging.go 1 year ago
tools.go 1 year ago
user
user.go 1 year ago
webapp
.gitignore 1 year ago
README.md 1 year ago
bun.lockb 1 year ago
index.html 1 year ago
package.json 1 year ago
public
favicon.ico 1 year ago
src
app.tsx 1 year ago
assets
book.svg 1 year ago
change_session.tsx 1 year ago
errors
404.tsx 1 year ago
genres.ts 1 year ago
index.css 1 year ago
index.tsx 1 year ago
pages
about.tsx 1 year ago
book_details.tsx 1 year ago
book_new.tsx 1 year ago
books.tsx 1 year ago
creator_details.tsx 1 year ago
creator_new.tsx 1 year ago
creators.tsx 1 year ago
genres_new.tsx 1 year ago
home.tsx 1 year ago
login.tsx 1 year ago
series_new.tsx 1 year ago
signup.tsx 1 year ago
roles.ts 1 year ago
routes.ts 1 year ago
select_many.tsx 1 year ago
user_info.tsx 1 year ago
tsconfig.json 1 year ago
vite.config.ts 1 year ago