Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
proxima812 committed Sep 10, 2024
1 parent e04867e commit b882573
Show file tree
Hide file tree
Showing 13 changed files with 197 additions and 69 deletions.
5 changes: 4 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ import vercel from "@astrojs/vercel/serverless";

import webVitals from "@astrojs/web-vitals";

import sitemap from "@astrojs/sitemap";

// https://astro.build/config
export default defineConfig({
integrations: [db(), tailwind(), react(), webVitals()],
integrations: [db(), tailwind(), react(), webVitals(), sitemap()],
site: 'https://wix.ro',
output: "server",
adapter: vercel()
});
2 changes: 1 addition & 1 deletion db/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Session = defineTable({
const Post = defineTable({
columns: {
id: column.number({ primaryKey: true }),
userId: column.text({ references: () => User.columns.id }),
userId: column.text({ optional: false, references: () => User.columns.id }),
// userId: column.text({ optional: false, references: () => User.columns.id }),
title: column.text(),
description: column.text(),
Expand Down
25 changes: 18 additions & 7 deletions db/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,29 @@ export default async function seed() {
await db.insert(User).values([
{
id: "user_id_1",
username: "user1",
password:
"$argon2id$v=19$m=19456,t=2,p=1$AC5gMGrqxRKrco6ITV7PiQ$zjiUdOTviT0EtitFcgIrOLOye2W5/yYgyoVNMla3PH4",
username: "admin",
password: "root",
},
])
await db.insert(Post).values([
{
id: 1,
userId: "user_id_1",
title: "Google1",
description:
"I found this cool site that can let you say anything you want without accountability!",
link: "https://123.com/",
title: "mat",
description: "nat",
link: "https://asda.com/",
},
])
// const queries = []

// for (let i = 0; i < 25; i++) {
// queries.push(
// db.insert(Post).values({
// title: `Test title ${i}`,
// description: `Test description ${i}`,
// link: `https://test.com/${i}`,
// }),
// )
// }
// await db.batch(queries)
}
58 changes: 58 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@astrojs/check": "^0.9.3",
"@astrojs/db": "^0.14.1",
"@astrojs/react": "^3.6.2",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vercel": "^7.8.0",
"@astrojs/web-vitals": "^3.0.0",
Expand Down
13 changes: 4 additions & 9 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/ogImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b882573

Please sign in to comment.