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

linear

v1.0.5

Published

A simple setup micro-forum built in Node.js with Express and MongoDB.

Downloads

103

Readme

linear

A simple setup micro-forum built in Node.js with Express and MongoDB.

Build Status codecov Dependency Status Known Vulnerabilities bitHound Overall Score NPM Version

Install

$ npm install linear --save

Quick Start

const linear = require('linear');

linear.startWithConfig({
    'site_name': 'Sample Forum'
});

Config

site_name

Type: String
Default: 'Sample Forum'

Name used in both header and title tags throughout the site.

directories

Type: Object
Default: {'static': './static'}

Directories used to overwrite the assets included with linear.

  • static: All static files: CSS, Fonts, JavaScript
  • locales: Localization files.
  • views: Server-side templates.

Note: Replacing the locales directory is a destructive action. Changing static or views is a additive action as the server will look for static files and view templates in the config specified directories first.

ga

Type: String
Default: ''

Tracking code for Google Analytics. http://www.google.com/analytics/

Environment Setup

Place the following key/value pairs in an .env file locally and within the settings panel of your Heroku application.

Setting Up MongoDB

Read more at https://devcenter.heroku.com/articles/nodejs-mongoose#mongodb-connectors.

MONGOLAB_URI=mongodb://username:[email protected]/linear

Setting Up Social Networks

Omitting either of these social networks will prevent it from showing up on the login screen.

Facebook

For more information on how to retrieve these keys see https://github.com/trylinear/linear/wiki/Social-Setup#facebook.

FACEBOOK_CLIENT_ID=<token>
FACEBOOK_CLIENT_SECRET=<token>
FACEBOOK_CALLBACK=http://localhost:5000/login/facebook/callback

Google

For more information on how to retrieve these keys see https://github.com/trylinear/linear/wiki/Social-Setup#google.

GOOGLE_CLIENT_ID=<token>
GOOGLE_CLIENT_SECRET=<token>
GOOGLE_CALLBACK=http://localhost:5000/login/google/callback

Twitter

For more information on how to retrieve these keys see https://github.com/trylinear/linear/wiki/Social-Setup#twitter.

TWITTER_CONSUMER_KEY=<token>
TWITTER_CONSUMER_SECRET=<token>
TWITTER_CALLBACK=http://localhost:5000/login/twitter/callback

The default template supports Twitter Cards. To get these to display you must first run a sample post through the Card Validator and then Request Approval to be whitelisted.

Setting Up Express Session Security

Read more at https://github.com/expressjs/session#sessionoptions.

SECRET=<token>