Skip to content

Simple CRUD using Sveltekit and Hono. This project was created as learning material for me to learn "How to Make an API" using Hono and using the API that I have created using Sveltekit.

License

Notifications You must be signed in to change notification settings

suryamsj/sveltekit-hono

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sveltekit & Hono

Screenshot

Simple CRUD using Sveltekit and Hono. This project was created as learning material for me to learn "How to Make an API" using Hono and using the API that I have created using Sveltekit.

Frontend

For the frontend I use:

# Clone this project
$ git clone https://github.com/suryamsj/sveltekit-hono

# Access
$ cd sveltekit-hono/frontend

# Install dependencies
$ npm install

# Run the project
$ npm run dev

# The server will initialize in the <http://localhost:5173>

Backend

For the backend I use:

# Clone this project
$ git clone https://github.com/suryamsj/sveltekit-hono

# Access
$ cd sveltekit-hono/backend

# Install dependencies
$ npm install

# Prisma init
$ npx prisma init --datasource-provider sqlite

# Copy prisma schema
generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "sqlite"
  url      = env("DATABASE_URL")
}

model Users {
  id         String   @id @default(cuid())
  name       String
  phone      String
  address    String
  created_at DateTime @default(now())
  updated_at DateTime @default(now()) @updatedAt
}

# create migration
$ npx prisma migrate dev --name init

# Run the project
$ npm run dev

# The server will initialize in the <http://localhost:3000>

About

Simple CRUD using Sveltekit and Hono. This project was created as learning material for me to learn "How to Make an API" using Hono and using the API that I have created using Sveltekit.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published