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

@velop/server

v0.3.2

Published

Serve one or more react apps! - Custom routes, HotReloading, Authenticated Apps/routes, Relay, Webpack ++

Downloads

10

Readme

velop-server

Greenkeeper badge Travis npm npm Coverage Status code style: prettier

Serve one or more React apps with one simple call. Supports Universal rendering, Webpack, HotReloading, Relay, Passport, FoundRouter, Graphql out of the box! Fully editable setup with a simple set of functions and commands. You can also add custom routes or static paths at your needs. Even add a authentication layer on top of the routes or apps you what! All this is possible with a simple set of functions.

Why?

This is not a standardization nor a boilerplate or startupkit. This is a engine that can serve the js for you in the way you want. A developer should not put resources into setting up core server, only provide details of what they want to serve and how to do it. The rest will @velop/server take care of!

Why not Next.js?

NextJS is a great tool for creating a boilerplate setup that you can edit for your needs. Full cretid to Zeit for some awesome work! But it has some core problems like serving multiple apps, custom static folders, authentication to routes, or just serving other then react apps. @velop/server aims to solve these problems and with a more simple solution. Calling functions and not configuring files.

Table of Contents

Installation

$ npm i -S @velop/server
or
$ yarn add @velop/server

Getting started

Create a awsome react app app/Routes.js with found routing/navigation Remember you must return a found makeRouteConfig.

Create a new file server.js with contents:

const Server = require('@velop/server')

var server = new Server({
  environment: 'development',
  hostname: 'localhost',
  port: 3000,
});

//To add a file or a folder with routes?
server.addRoute('routes/');

//To add a React app with serverside render support
server.addReactRoute(
  '',   // URI prefix
  path.resolve(process.cwd(), 'app/Routes.js'), //path to APP file
);

//Start server!
server.start();

Create a .babelrc file for your needs:

{
  "presets": [
    "react",
    "stage-0"
  ],
  "plugins": [
    "transform-runtime"
  ],
  "env": {
    "development": {
      "plugins": ["react-hot-loader/babel"]
    }
  }
}

Run the server:node server.js Good luck!

Features

Thanks to: