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 🙏

© 2024 – Pkg Stats / Ryan Hefner

nextjs-azure

v0.0.4

Published

Allows you to host your nextjs applications on azure. The overarching goal of this library is to give you the best possible experience and performance of Azure without being too opinionated on which services you use and how your application is configured

Downloads

6

Readme

nextjs-azure

Allows you to host your nextjs applications on azure. The overarching goal of this library is to give you the best possible experience and performance of Azure without being too opinionated on which services you use and how your application is configured.

Currently, this library is NOT production ready. I use this library for my pages/api folder across 3-4 of our projects but I do not use any getInitialProps/getStaticProps, etc. I'm in the process of making this production ready as fast as possible.

// please make sure your next.config.js contains the entry module.exports = {output: "standalone"}
npm i --save-dev nextjs-azure
npx next build && npx next export && npx next-azure

To deploy we would highly recommend using our infrastructure as code via pulumi, we have a /infra folder you can copy which will deploy everything to best-practice resulting in a setup 30%-50% faster than vercel.

Features

  • ✅ getInitialProps [full support]
  • ✅ /pages/api [full support]
  • ✅ getServerSideProps [partial support, full coming]
  • ✅ getStaticProps [assumed support]
  • 🚧 Documentation [Coming soon]
  • 🚧 _middleware [refer to roadmap]
  • 🚧 Image optimization [refer to roadmap]
  • 🚧 Rewrites/Redirects [refer to roadmap]
  • 🚧 ISR [refer to roadmap]
  • 🚧 Webpack plguin that allows you to have pages/api routes that trigger from native bindings [refer to roadmap]
  • ❓ Localization [refer to roadmap, support = unknown]
  • ❓ AMP [refer to roadmap, support = unknown]

The build (npx nextjs-azure) output should generate 3 folders:

  • ./api - This is your pages/api folder if you're running NextJS full stack, this contains your code wrapped in an Azure compatibility function signature.
  • ./ui-backend - This contains all the backend functions and code to render your UI pages on the server if you're using getInitialProps.

You are responsible for routing depending on which respective Azure services you use. The following routers are coming in the following priority order:

  1. Azure Front Door
  2. APIM Router
  3. SWA Router

Deployment

You are responsible for deployment, the recommendation would be to use IAC which is a technique to make infrastructure part of your git workflow. The following IAC setups are coming in the following priority order:

  1. Pulumi
  2. Terraform - This is a long time away as we need to create a dynamic number of a certain resource for front door which isn't well-supported on .tf

Goals

  • Offer best in class performance on Azure for hosting NextJS applications - Taking into account best services to use, and endless optimizations for cold start, parse time, download time and more.
  • Feature complete NextJS hosting including _middleware and image optimization.
  • Non-http function app bindings support with in built integration with NextJS (blob bindings, event hub, etc.)
  • Eventually support AWS
  • Eventually support hybrid cloud with cloudflare

Bugs:

  • Open an issue. I'll get back to you as soon as I can

NextJS Advice and Support

  • Just reach out