Total Pageviews

Saturday, 11 June 2022

一个基于nodejs的建站程序: socks-by-cen3031-socks

 

Overview

This is a web application to manage the records for cat shelters -- specifically, Save Our Cats and Kittens (SOCKS). It will track records for cats in the shelter, like needed treatments, their locations, potential adopters, etc. In addition, it will manage the shelter's contacts, donors, shelter intake, and track volunteers.

Prerequisites

Make sure you have installed all of the following prerequisites on your development machine:

  • Node.js - Download & Install Node.js and the npm package manager. If you encounter any problems, you can also use this GitHub Gist to install Node.js.
  • MongoDB - Download & Install MongoDB, and make sure it's running on the default port (27017).
  • Bower - You're going to use the Bower Package Manager to manage your front-end packages. Make sure you've installed Node.js and npm first, then install bower globally using npm:
$ npm install -g bower
  • Grunt - You're going to use the Grunt Task Runner to automate your development process. Make sure you've installed Node.js and npm first, then install grunt globally using npm:
$ npm install -g grunt-cli

Downloading

Clone this GitHub repository:

$ git clone https://github.com/cen3031-socks/socks 

This will clone the latest version of the SOCKs repository to a socks folder. Once you've downloaded it, you install it with npm:

cd socks

npm install

This command does a few things:

  • First it will install the dependencies needed for the application to run.
  • If you're running in a development environment, it will then also install development dependencies needed for testing and running the application.
  • Finally, when the install process is over, npm will initiate a bower install command to install all the front-end modules needed for the application.

Before you can run the app, you need to start a MongoDB process. To do this, you must create a data directory somewhere on your disk. Then, run mongod with that data path like so:

$ mongod --dbpath /path/to/data/folder

Leave it running in one window and then continue with the other steps in a new window.

After the install process is over, you'll be able to run it using Grunt. Just run grunt default task:

$ grunt

The application should run on port 3000, so in your browser just go to http://localhost:3000

from  https://github.com/cen3031-socks/socks

No comments:

Post a Comment