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

restate

v0.7.12

Published

Framework for creating REST-based NodeJS applications with ease.

Downloads

19

Readme

restate

restate is a boilerplate aiding the creation of modern web applications enclosing client-side and server-side as well in a greatly configurable way.

It is just a possible way how to build-up a project covering all task you might deal with during a project's life cycle:

  • well-structured project where every parts has decent and separated space covering server-side, clien-side, tests, reports, static elements, etc.
  • highly modularized building scripts
  • coding with the help of code coverage measurer and code error detector
  • configurable server optionally preconfigured with security measurements, clustering, socketing, rest services, mongodb connectivity
  • web development with livereload
  • headless TDD or BDD testing phases

A straight-way proven completeness is more in focus than being X or Y lib-agnostic.

Involves technologies like:

and a lots of other great goods you might need for a live enterprise-level project!

Installation

$ npm install -g restate

Usage

Step into a folder where you want to create your new project folder and execute the following from command line:

$ restate project projectName [--web] [--server] [--complete] [--noAA] [--noREST] [--noMongo] [--noKO] [--noWebsocket]

This will create the project structure and scripts for it allowing you to build into 2 different stages: development and production.

restate finishes in an instant and you are ready to go! (have a running local mongo!)

$ ./buildDevelopment.sh

And open browser:

http://localhost:8080/

Done. :)

Configuration

--web
Tells to restate to generate client-side code & tools.

--server
Tells to restate to generate server-side code & tools.

--complete
Tells to restate to generate client-, and server-side code & tools as well.

--noAA
Removes the built-in A&A tempalte code from the server-side.

--noREST
Removes the built-in RESTful tempalte code from the server-side.

--noMongo
Removes the built-in MongoDB tempalte code from the services-side

--noKO
Removes the built-in Knockout.js tempalte code from the client-side

--noWebsocket
Removes the built-in Websocket tempalte code from the services-side

Project structure

.gitignore --- usual
buildDevelopment.sh --- shorthand for gruntRun.sh
buildProduction.sh --- shorthand for gruntRun.sh
config/ --- json config files configuring server and db connectivity
Gruntfile.js --- grunt file and plugins
gruntRun.sh --- runs grunt with a parameter specifying the stage level
package.json --- usual
server/ --- js files of the server. RESTful services, connect server, A&A services, Mongo connectivity
web/ --- dynamic web files
	abstract
		less/ --- folder for less files
		js/  --- folder for the js files
			lib/  --- folder for the external js files
		views/  --- folder for the jade files
	[a specific site]
		less/ --- folder for less files
		js/  --- folder for the js files
			lib/  --- folder for the external js files
		views/  --- folder for the jade files
www/ --- static files' folder

Every build will be put into the created 'dist' folder.

Multiple pages

If your project is created with the argument

--web

or

--complete

then you will have a web folder possessing 3 subfolders by default:

abstract, ad, workspace

The concept is simple. There is an abstract folder for generic definitions required by all sites, and as many specific folder as you want to build up.

The abstract folder contains all less, js or jade files which should be inherited across the concrete sites.

While the concrete pages' folders (ad and workspace folders by default) are dedicated to define the specific and unique part of a given site.

Ad: could be a landing page. A static JADE-based page, reduced dependency-graph minimizing the loading time

Workspace: could be the workspace for your webapp. It is dynamic JADE site, so page is evaluated and compiled on the fly

As you can see in the ad folder for example, you can inherit anything you need from the abstract folder keeping project maintainability at high level when multiple sites need to be built up and managed.

Adding a page

You can extend your [restate](https://github.com/imrefazekas/restate) project by a new page by executing the following:

restate page demo [--dynamic]

This will create a new page called "demo" and create the necessary gulp and test files as well similar to all preconfigured site you have by default.

The parameter --dynamic tells to restate to consider tha page as a dynamic one so build steps will presume on-the-fly compile activity.

Contribute or Request

Feel free to add requests to extend the capabilities of this utility!