npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vercel-spring

v0.1.10

Published

Spring runtime for Vercel - deploy Spring Boot apps using GraalVM Native Image

Readme


vercel-spring adalah Vercel Community Runtime untuk Spring Boot. Dengan GraalVM Native Image, aplikasi Spring Boot kamu bisa jalan di Vercel sebagai serverless function — cold start di bawah 500ms.


📦 Installation

npm i -g vercel

Tidak perlu install vercel-spring secara lokal. Cukup referensikan di vercel.json.

🚀 Quick Start

1. Struktur project

my-spring-app/
├── api/
│   └── index.java          # Marker entrypoint
├── src/
│   └── main/
│       ├── java/
│       └── resources/
├── pom.xml
├── vercel.json
└── .vercelignore

2. api/index.java (marker file)

// Marker file for Vercel Spring Boot runtime

3. vercel.json

{
  "functions": {
    "api/index.java": {
      "runtime": "[email protected]",
      "memory": 3008,
      "maxDuration": 30
    }
  },
  "routes": [
    { "src": "/(.*)", "dest": "/api/index.java" }
  ]
}

4. pom.xml — tambahkan native profile

<profile>
    <id>native</id>
    <build>
        <plugins>
            <plugin>
                <groupId>org.graalvm.buildtools</groupId>
                <artifactId>native-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>build-native</id>
                        <goals><goal>compile</goal></goals>
                        <phase>package</phase>
                    </execution>
                </executions>
                <configuration>
                    <imageName>${project.artifactId}</imageName>
                    <buildArgs>
                        <!--
                          NOTE: --no-fallback is intentionally omitted.
                          It causes native-image to fail if ANY reachability
                          metadata is missing. For serverless deployment, a
                          fallback image is acceptable.
                        -->
                        <buildArg>--enable-url-protocols=http</buildArg>
                    </buildArgs>
                </configuration>
            </plugin>
        </plugins>
    </build>
</profile>

5. Deploy

vercel --prod

Done. 🎉

🔧 How It Works

                          Vercel Platform
                               │
                     ┌─────────▼─────────┐
                     │   HTTP Request     │
                     └─────────┬─────────┘
                               │
                     ┌─────────▼─────────┐
                     │  launcher.mjs      │  (Node.js Lambda handler)
                     │  (keep-alive)      │
                     └─────────┬─────────┘
                               │ spawn / proxy
                     ┌─────────▼─────────┐
                     │ spring-app.bin     │  (GraalVM native image)
                     │ Spring Boot App    │
                     └───────────────────┘

| Tahap | Proses | |---|---| | Build | Deteksi project → install GraalVM → build native image (mvn -Pnative native:compile / gradle nativeCompile) | | Runtime | Node.js launcher spawn native binary, proxy HTTP request, 5 menit keep-alive untuk reuse |

✨ Features

  • Zero configuration — auto-detect Java version & build system (Maven/Gradle)
  • Multi-Java — mendukung Java 17, 21, 22, 23, 24, 25
  • Cold start cepat — ~100-500ms (vs 5-15s di JVM biasa)
  • Auto-download toolchain — GraalVM, Maven, Gradle di-download otomatis
  • H2 friendly — auto-exclude konfigurasi yang bikin warning di native-image

📁 Contoh Project

Lihat example/ untuk project Spring Boot lengkap yang siap deploy.

⚠️ Limitations

| Item | Detail | |---|---| | Cold start | ~100-500ms (native image) | | Package size | ~50-70MB (masih di bawah limit Vercel 250MB) | | Timeout | Atur via maxDuration di vercel.json (maks 900s) | | State | Setiap Lambda instance bersifat ephemeral |

🛠 Development

git clone https://github.com/awand795/vercel-spring.git
cd vercel-spring
npm install
npm run build

🤝 Contributing

Lihat CONTRIBUTING.md untuk panduan kontribusi (tersedia dalam Bahasa Indonesia dan English).

📄 License

MIT