https://github.com/solo-samurai/go-serverless
A modern serverless API built with Go and Fiber framework, deployed on Vercel.
https://github.com/solo-samurai/go-serverless
clerkauth golang serverless vercel
Last synced: 6 months ago
JSON representation
A modern serverless API built with Go and Fiber framework, deployed on Vercel.
- Host: GitHub
- URL: https://github.com/solo-samurai/go-serverless
- Owner: solo-samurai
- License: mit
- Created: 2025-04-04T11:59:00.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-04T12:49:18.000Z (about 1 year ago)
- Last Synced: 2025-06-05T04:23:24.971Z (10 months ago)
- Topics: clerkauth, golang, serverless, vercel
- Language: Go
- Homepage: https://go-serverless-smoky.vercel.app
- Size: 41 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go Serverless Application
A modern serverless API built with Go and Fiber framework, deployed on Vercel.
## 🚀 Features
- Built with Go and Fiber framework
- Serverless deployment on Vercel
- Clerk Authorization
- Swagger API documentation
- Hot reloading during development (using Air)
- Clean project structure
## 📋 Prerequisites
- Go 1.24.1
- Node.js and pnpm
- Vercel CLI
- Git
- Air (for development hot reloading)
## 🛠️ Installation
1. Clone the repository:
```bash
git clone https://github.com/yourusername/go-serverless.git
cd go-serverless
```
2. Install Go dependencies:
```bash
go mod download
```
3. Install Node.js dependencies:
```bash
pnpm install
```
4. Install Air for hot reloading (optional):
```bash
go install github.com/cosmtrek/air@latest
```
5. Set up environment variables:
```bash
cp .env.example .env
```
Edit the `.env` file with your configuration.
## 🔧 Development
You have two options for local development:
### Option 1: Using Air (Recommended for Go development)
```bash
air
```
This will start the server with hot reloading enabled. The application will be available at `http://localhost:8080`
### Option 2: Using Vercel CLI
```bash
pnpm dev
```
This will start the server using Vercel's development environment.
Note: The `main.go` file is only used for local development. In production, the application runs as a serverless function on Vercel.
## 🚀 Deployment
The application is configured for deployment on Vercel. To deploy:
1. Login to Vercel:
```bash
pnpm setup
```
2. Deploy to Vercel:
```bash
pnpm start
```
## 📁 Project Structure
```
.
├── api/ # API routes and handlers
├── app/ # Application core
├── docs/ # Documentation
├── middleware/ # Middleware functions
├── public/ # Static files
└── main.go # Development entry point (local only)
```
## 🔐 Environment Variables
Create a `.env` file in the root directory with the following variables:
```
# Add your environment variables here
```
## 📝 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE).