3.2.0 • Published 7 years ago

steeplejack v3.2.0

Weekly downloads
118
License
MIT
Repository
github
Last release
7 years ago

Steeplejack

Gitter NPM Version NPM Downloads Node.js Version Build Status Code Quality Dependencies Dev Depedencies

An easy way of making a Twelve Factor App in NodeJS

What is Steeplejack?

The goal of this project is to write reusable applications, using reusable components in whatever flavour of JavaScript you want.

When creating a new project, you need to set up the same things over and over again - your data models and collections, your dependency injection, your HTTP server, your routing and your logging. With Steeplejack, this is all there by default allowing you to get straight into your coding.

This is not a framework, it is scaffolding for modules. It doesn't tell you how to write your software, it just lets you do it. You can use Express or Restify as your HTTP strategy or even one of your own. So long as it satisfies the strategy, it doesn't care.

Almost every application will require some form of data storage. It's likely there will be some form of user management too. In the most part, these will be the same across all your projects. So, write these as plugins and use them across multiple projects rather than write it afresh each time.

What makes the Twelve Factor App so great?

Pick any of the following reasons:

  • makes your software more robust
  • makes your software truly scalable
  • you can give true long-term support for your software
  • happier developers

Steeplejack adds to this by:

  • allowing you to reuse your code in the form of plugins
  • being stupidly easy to set up a new server
  • things needed in every piece of software - error logging, data modelling and routing - are provided out-of-the-box

Config

A litmus test for whether an app has all config correctly factored out of the code is whether the codebase could be made open source at any moment, without compromising any credentials.

Twelve Factor App: Config

A lot of developers still specify all the different config environments in their config file. That was great when we wrote PHP and there were only three instances; dev, test and live. The power of NodeJS comes from it's scalability - how scalable is it going to be if, every time the operations guy wants to add a new server at 2am, you need to get out of bed and add in a new environment in your config file?

Get rid of all the environments out of your config file and just have one (the development one, so you don't have to dig around each time you download from the repo). For all other deployments of your software, use environment variables. Then it's the deployer's responsibility to put in the right config and you can stay in bed.

Steeplejack offers a single config file that can be overwritten by either environment variables or command line arguments. The application then has one single source of truth with your config and it's your choice how to specify the deployment config.

Data Modelling

The Twelve Factor App is all about loose coupling to your attached resources. You might start by using MongoDB, but there will be a time when that isn't the best solution. If you're using something like Mongoose, you are tied-in to MongoDB regardless.

The data modelling in Steeplejack is all about the data - it doesn't care where you store it, if indeed anywhere. The data is designed to be used by your application and stored in a way you decide. If your model doesn't match your data store exactly, no problem. There is a loose link between the model and the storage.

When you're dealing with lots of models, you can create a collection. Maybe you get your data from multiple sources and want to sort it in the application. Steeplejack allows you to write a simple method to do that.

Why's it called 'Steeplejack'?

When I started thinking about a scaffolding project, I was watching a Fred Dibnah documentary. Fred was a great enthusiast of beautiful engineering. It struck me as a great metaphor for what I was trying to achieve. By trade, Fred was a steeplejack, so the name is a little nod to him.

Fred Dibnah

License

MIT License

3.2.0

7 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

3.0.0-rc4

7 years ago

3.0.0-rc3

7 years ago

3.0.0-rc2

7 years ago

3.0.0-rc1

7 years ago

2.0.0

8 years ago

2.0.0-50

8 years ago

2.0.0-49

8 years ago

2.0.0-48

8 years ago

2.0.0-47

8 years ago

2.0.0-45

8 years ago

2.0.0-44

8 years ago

2.0.0-43

8 years ago

2.0.0-42

8 years ago

2.0.0-41

8 years ago

2.0.0-40

8 years ago

2.0.0-39

8 years ago

2.0.0-38

8 years ago

2.0.0-37

8 years ago

2.0.0-36

8 years ago

2.0.0-35

8 years ago

2.0.0-34

8 years ago

2.0.0-33

8 years ago

2.0.0-32

8 years ago

2.0.0-31

8 years ago

2.0.0-30

8 years ago

2.0.0-29

8 years ago

2.0.0-28

8 years ago

2.0.0-27

8 years ago

2.0.0-26

8 years ago

2.0.0-25

8 years ago

2.0.0-23

8 years ago

2.0.0-22

8 years ago

2.0.0-21

8 years ago

2.0.0-19

8 years ago

2.0.0-18

8 years ago

2.0.0-17

8 years ago

2.0.0-16

8 years ago

2.0.0-15

8 years ago

2.0.0-14

8 years ago

2.0.0-13

8 years ago

2.0.0-12

8 years ago

2.0.0-11

8 years ago

2.0.0-10

8 years ago

2.0.0-9

8 years ago

2.0.0-8

8 years ago

2.0.0-7

8 years ago

2.0.0-5

8 years ago

2.0.0-4

8 years ago

2.0.0-3

8 years ago

2.0.0-2

8 years ago

2.0.0-1

8 years ago

2.0.0-0

8 years ago

1.3.0

8 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.2

9 years ago

1.1.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

1.0.0-alpha13

9 years ago

1.0.0-alpha12

9 years ago

1.0.0-alpha11

9 years ago

1.0.0-alpha10

9 years ago

1.0.0-alpha9

9 years ago

1.0.0-alpha8

9 years ago

1.0.0-alpha7

9 years ago

1.0.0-alpha6

9 years ago

1.0.0-alpha5

9 years ago

1.0.0-alpha4

9 years ago

1.0.0-alpha3

9 years ago

1.0.0-alpha2

9 years ago

1.0.0-alpha1

9 years ago

1.0.0-alpha.1

9 years ago

0.5.1

9 years ago

0.5.0

9 years ago

0.4.0

9 years ago

0.3.10

9 years ago

0.3.9

9 years ago

0.3.8

9 years ago

0.3.7

9 years ago

0.3.6

9 years ago

0.3.5

9 years ago

0.3.4

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.8

10 years ago

0.0.0

10 years ago

0.0.1

10 years ago