Headless Content Management System designed with content strategy at its heart. Built with Node.
Install and Usage
npm i punchcard-cms --save
const punchcard = ;
Setting File Storage
Make sure PostgresSQL is set up locally (see below)
Install all the things
Run the following to run both the database and get the server running:
$ npm run dev
Uses node's built in inspector. This works in chrome only.
$ npm run dev:database
then in a separate window:
$ npm run debug
There will be instructions and a link to paste into chrome shown in the terminal after this
debug command is run.
Setting up PostgreSQL locally
Make sure you have homebrew installed:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install postgres
start the postgres server:
postgres -D /usr/local/var/postgres
open new terminal tab
create a postgres user (it'll prompt for a password use
createuser punchcard -P
Create local CMS database:
createdb -O punchcard punchcard
Create local test database:
createdb -O punchcard punchcard_test
reconnect to psql as new user:
psql -d punchcard -U punchcard
connect to db:
Once you are connected you should be able to use psql cli syntax to check tables.
\d+checks table relations
\llists all available databases
select * from "database_name";Displays all rows in database, replacing database_name with the table you want to see.
- list all tables for user punchcard:
\c punchcard \dt
See the latest release for the most recent changelog