Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Inspiration
Website
Commits
57a51a2f
Commit
57a51a2f
authored
5 months ago
by
satwikShresth
Browse files
Options
Downloads
Patches
Plain Diff
adding information right inside the justfile
parent
87bee17b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.justfile
+36
-1
36 additions, 1 deletion
.justfile
backend/src/utils/dev.ts
+22
-1
22 additions, 1 deletion
backend/src/utils/dev.ts
with
58 additions
and
2 deletions
.justfile
+
36
−
1
View file @
57a51a2f
# Tool Dependency Checker and Project Setup
# Usage: just check-all or just setup-all
# Default recipe (runs when just is called with no arguments)
default:
@echo "Available commands:"
...
...
@@ -99,6 +100,11 @@ start-development: setup-all
@echo "Starting development environment..."
docker compose up --build --watch
# Start testing environment
start-testing:
@echo "Starting testing environment..."
docker compose up --build
# Clean Docker containers, builds and volumes
clean:
@echo "Cleaning Docker resources..."
...
...
@@ -133,14 +139,43 @@ gen-backend-client:
@echo "New client for backend generated"
# Generate a custom migration
gen-auth-client:
@echo "Generating new client for auth..."
cd frontend && npm run gen:auth:client
@echo "New client for auth generated"
#Print Admin
print-admin:
@echo "Email: admin@example.com"
@echo "Password: Password123"
# Function to open link
open *ARGS:
{{ browser_cmd }} {{ ARGS }}
# Function to open drizzle studio
open-drizzle-studio:
{{ browser_cmd }} {{ drizzle_studio }}
# Function to open redis insight
open-redis-insight:
{{ browser_cmd }} {{ redis_insight }}
# Function to open frontend
open-frontend:
{{ browser_cmd }} {{ frontend }}
# Function to open frontend
open-minio:
{{ browser_cmd }} {{ minio }}
# Individual checks available as separate commands
npm := "check-npm"
node := "check-node"
deno := "check-deno"
docker := "check-docker"
browser_cmd := if os_family() == "windows" { "start" } else if os() == "macos" { "open" } else { "xdg-open" }
drizzle_studio := "https://local.drizzle.studio"
redis_insight := "https://localhost:5540"
frontend := "https://localhost"
minio := "https://localhost:9001"
This diff is collapsed.
Click to expand it.
backend/src/utils/dev.ts
+
22
−
1
View file @
57a51a2f
...
...
@@ -2,6 +2,8 @@ import { Hono } from 'hono';
import
*
as
path
from
'
@std/path
'
;
import
{
auth
}
from
'
./auth/index.ts
'
;
import
{
FilecontentRoutes
,
UserRoutes
,
WorkOrderRoutes
}
from
'
../routes/index.ts
'
;
import
{
db
,
users
}
from
'
@db/index.ts
'
;
import
{
eq
}
from
'
drizzle-orm
'
;
export
const
devHook
=
async
(
app
:
any
,
routes
:
any
)
=>
{
const
{
generateSpecs
,
openAPISpecs
}
=
await
import
(
'
hono-openapi
'
);
...
...
@@ -22,8 +24,27 @@ export const devHook = async (app: any, routes: any) => {
},
};
app
.
get
(
'
/openapi
'
,
openAPISpecs
(
routes
,
options
));
auth
.
api
.
createUser
({
body
:
{
email
:
'
admin@example.com
'
,
name
:
'
Admin
'
,
password
:
'
Password123
'
,
role
:
'
Admin
'
,
},
})
.
then
(
async
({
user
})
=>
{
console
.
error
(
'
User has been created:
'
,
user
);
return
await
db
.
update
(
users
)
.
set
({
emailVerified
:
true
})
.
where
(
eq
(
users
.
id
,
user
.
id
))
.
then
(()
=>
console
.
log
(
'
User created and verified successfully
'
))
.
catch
((
error
)
=>
console
.
error
(
'
Error verifying user email:
'
,
error
));
})
.
catch
(
console
.
error
);
app
.
get
(
'
/openapi
'
,
openAPISpecs
(
routes
,
options
));
auth
.
api
.
generateOpenAPISchema
()
.
then
((
spec
)
=>
Deno
.
writeTextFileSync
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment