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