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

kidjs

v1.1.0-alpha.10

Published

Kidjs is a lightweight framework for server‑rendered

Downloads

8

Readme

概述

简单好用的 Next.js 自定义服务器。

为什么使用服务端渲染?

  • 能够为客户提供更理想的性能;
  • 提供更为一致的 SEO 表现;

为什么使用 Kid.js

Kid.js 为 Next.js 提供更加人性化的后端服务能力,支持自定义路由和接口、环境配置等功能。同时不破坏 Next.js 原有的特性及开发体验。

Kid.js 作为 Next.js 的附加服务,与 Next.js 本身不存在耦合,可随时被添加至一个现有的 Next.js 应用中,并可以在任何时候从你的应用中移除。

在技术选型上使用性能优异的 Koa 作为底层。

在安全和稳定性方面,Kid.js 内置常见攻击的防御机制。

Kid.js 关注服务端渲染的性能,默认开启页面级缓存。

特性

  • 基于 Koa.js 开发,性能优异;
  • 页面级缓存;
  • 配置化开发和部署;

快速入门

启动一个新的项目

我们只需要几个步骤,就可以让你的服务运行起来:

$ npm i --save kidjs next react react-dom

在你的 package.json 中添加运行脚本:

{
  "scripts": {
    "dev": "kid",
    "build": "kid build",
    "start": "KID_ENV=prod kid"
  }
}

创建首页(.pages/index.js):

export default () => <div>Welcome to kid.js!</div>

启动项目:

$ npm run dev
$ open 127.0.0.1:7214

在 Next.js 中使用 Kid.js

$ npm i --save kidjs

在配置中声明自定义端口(可选):

// config/config.default.js

module.exports = {
  port: 7707
}

更改 package.json 中的运行脚本:

{
  "scripts": {
    "dev": "kid",
    "build": "kid build",
    "start": "KID_ENV=prod kid"
  }
}

启动项目:

$ npm run dev
$ open 127.0.0.1:7707

LICENSE

Kid.js 采用 MIT 开源许可。

Kid.js 关注企业和项目的版权风险,所有依赖的框架和库均采用 MIT 许可,并对依赖进行扫描。