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

ht_server

v0.0.1

Published

纯后台框架 http

Downloads

6

Readme

ht_server

#ht_server是什么? 纯后台逻辑,http协议,短连接

#技术栈 express mongodb redis

#特征 自动加载routes 支持mongodb配置 支持migrate测试 支持mocha测试 集成supervisor,代码变动,自动重载 gulp自动监控文件变动,跑测试 使用log4js记录日志

#开发流程 确定models内容,如果是已有库或已有模型,可以直接使用 编写接口文档 通过migrate来测试model里的方法(如果测试熟悉,可以直接写测试) 通过supertest来测试接口(R层)是否合法 通过mocha测试其他业务代码(C层、S层、M层)

RSM分层思想

R = routes

路由层,和express的一样 说明:如果是逻辑非常简单的路由,随便写写也无妨

S = services

业务逻辑层,通常业务比较复杂才会用到业务逻辑层的,如果是单表能处理的,就没有必要使用services层了, 所以S层通常是多个models操作的业务逻辑,为了逻辑清晰,和耦合,S层很多时候是必要的。 说明:S层只会出现在R层代码里,是对多个models操作的封装。

M = models

模型层,也就是我们常说的dao层,即data access object,这里采用mongodb + redis 完成model层建模 说明:M层可能出现在S层或R层,不允许出现在其他位置

#启动 1.纯后台业务 node bin/server.js 2.http及网页 node bin/www