0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
Independent technology for modern publishing, memberships, subscriptions and newsletters.
Find a file
Katharina Irrgang 1882278b5b 🎨 configurable logging with bunyan (#7431)
- 🛠  add bunyan and prettyjson, remove morgan

-   add logging module
  - GhostLogger class that handles setup of bunyan
  - PrettyStream for stdout

-   config for logging
  - @TODO: testing level fatal?

-   log each request via GhostLogger (express middleware)
  - @TODO: add errors to output

- 🔥  remove errors.updateActiveTheme
  - we can read the value from config

- 🔥  remove 15 helper functions in core/server/errors/index.js
  - all these functions get replaced by modules:
    1. logging
    2. error middleware handling for html/json
    3. error creation (which will be part of PR #7477)

-   add express error handler for html/json
  - one true error handler for express responses
  - contains still some TODO's, but they are not high priority for first implementation/integration
  - this middleware only takes responsibility of either rendering html responses or return json error responses

- 🎨  use new express error handler in middleware/index
  - 404 and 500 handling

- 🎨  return error instead of error message in permissions/index.js
  - the rule for error handling should be: if you call a unit, this unit should return a custom Ghost error

- 🎨  wrap serve static module
  - rule: if you call a module/unit, you should always wrap this error
  - it's always the same rule
  - so the caller never has to worry about what comes back
  - it's always a clear error instance
  - in this case: we return our notfounderror if serve static does not find the resource
  - this avoid having checks everywhere

- 🎨  replace usages of errors/index.js functions and adapt tests
  - use logging.error, logging.warn
  - make tests green
  - remove some usages of logging and throwing api errors -> because when a request is involved, logging happens automatically

- 🐛  return errorDetails to Ghost-Admin
  - errorDetails is used for Theme error handling

- 🎨  use 500er error for theme is missing error in theme-handler

- 🎨  extend file rotation to 1w
2016-10-04 16:33:43 +01:00
.github 🔥 remove postgres support 2016-09-20 15:59:34 +01:00
content Upgrading Casper to 1.3.2 2016-10-02 17:58:14 +01:00
core 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
.editorconfig Various post-repo-split cleanup (#6910) 2016-07-12 11:55:46 -06:00
.gitignore extend .gitignore 2016-09-20 15:59:34 +01:00
.gitmodules Add Admin-Client as submodule at core/client 2016-05-19 14:20:18 +01:00
.jscsrc Various post-repo-split cleanup (#6910) 2016-07-12 11:55:46 -06:00
.jshintrc improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
.npmignore
.travis.yml 🔥 remove postgres support 2016-09-20 15:59:34 +01:00
Gruntfile.js 🔥 Remove the contributor list from Gruntfile (#7428) 2016-09-26 07:16:55 -05:00
gulpfile.js 🛠 Gulp help (#7462) 2016-10-03 15:08:40 +01:00
index.js 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
LICENSE
package.json 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
PRIVACY.md Switch to new native system font stack (#7219) 2016-08-18 20:29:46 +01:00
README.md Update readme for 1.0 😱 (#7405) 2016-09-20 15:59:34 +01:00
SECURITY.md Update SECURITY.md 2016-01-13 18:22:09 +02:00

Ghost Build status

Warning: Major release in progress. Expect things to be broken in master.

The project is maintained by a non-profit organisation called the Ghost Foundation, along with an amazing group of independent contributors. We're trying to make publishing software that changes the shape of online journalism.

NOTE: If youre stuck, cant get something working or need some help, please head on over and join our Slack community rather than opening an issue.

 

Quick Start Install

First, youll need Node.js v4 LTS or a supported version.

  1. Download the latest release of Ghost
  2. Unzip, and fire up terminal
  3. npm install --production
  4. Start Ghost!
    • Local environment: npm start
    • On a server: npm start --production
  5. http://localhost:2368/ghost 🎉

More install docs here in case you get stuck.

 

Developer Install

This is for if you want to hack on Ghost core. First, youll need Node.js v4 LTS or a supported version. Then:

git clone git://github.com/tryghost/ghost.git
cd ghost

Install grunt

npm install -g grunt-cli

Install Ghost

npm install

Build the things!

grunt init

Start your engines

grunt dev

Congrats! You made it. BTW you can also just npm install ghost if you're into that sort of thing. NPM aficionados can also read up on using Ghost as an NPM module. More general install docs here in case you got stuck.

 

Deploying Ghost

Ghost(Pro)

The easiest way to deploy Ghost is with our official Ghost(Pro) managed service. You can have a fresh instance up and running in a couple of clicks with a worldwide CDN, backups, security and maintenance all done for you.

Not only will it save you many hours per month, but all revenue goes to the Ghost Foundation, which funds the maintenance and further development of Ghost itself. So youll be supporting open source software and getting a great service at the same time! Talk about win/win. 🏆

Other options are also available if you prefer playing around with servers by yourself, of course. The freedom of choice is in your hands.

 

Staying Up to Date

When a new version of Ghost comes out, you'll want to look over these upgrade instructions for what to do next.

You can talk to other Ghost users and developers in our public Slack team (it's pretty awesome). We have a public meeting every Tuesday at 5:30pm UK time.

New releases are announced on the dev blog. You can subscribe by email or follow @TryGhost_Dev on Twitter, if you prefer your updates bite-sized and facetious. 🎷🐢

 

Copyright & License

Copyright (c) 2013-2016 Ghost Foundation - Released under the MIT license.