NPM Install
Tip CityZen requires a fairly recent version of both npm and Node.js. To install both go here:
Get NPM
For reference when these docs were written we were using version 12.18.1 of Node.js and version 6.14.5 of npm
Installing the CityZen Server
The CityZen-Server project page on npm: CityZen-Server
To install CityZen first create the directory cityzen-server.
md CityZen-Server
Then open a command prompt, navigate to the directory CityZen-Server and type npm init.
npm init
Then you have to answer a series of questions about the project. Next to install the server you want type on the command line:
npm i @codeforlansing/cityzen-server
Or alternately you can install using npx:
npx @codeforlansing/cityzen-server
Installing the CityZen client
The CityZen-Client project page on npm: CityZen-Client
Once you have setup the CityZen Server you also need to create a Trello account. For help linking the Trello account to the server visit the CityZen docs. It will walk you through getting the required information from Trello and create an env file for the CityZen server.
Once you have the server running and linked to Trello you can install the client on your web server. The client will install to port 8080. There are two ways to install the client:
First way is to simply download the client and associated files. Two files are required Client.html and sample-volunteer-tasks.css
Second way is to build the web page yourself and be sure to link to three CDN files in your pages head statement:
- https://cdn.jsdelivr.net/npm/@codeforlansing/cityzen-client-vue@latest/dist/js/volunteer-tasks.js
- https://cdn.jsdelivr.net/npm/@codeforlansing/cityzen-client-vue@latest/dist/js/volunteer-tasks.js.map
- https://cdn.jsdelivr.net/npm/@codeforlansing/cityzen-client-vue@latest/dist/css/volunteer-tasks.css
TIP If you need a local development web server CityZen recommends http-server