Giter Site home page Giter Site logo

restaurantcms's Introduction

Restaurant CMS

Starter project for Express, AngularJS, CoffeeScript, LESS, JADE, TwitterBootstrap, Mongoose.
Just my personal project for learning, really.
I am hoping to be able to reuse most of scripts and code from this project for future projects!.

How to Install

The following terminal commands assumes you are already in the project directory.

Install Mongo database

$ sudo apt-get install mongodb

Install Elastic Search and the head plugin for GUI

$ sudo apt-get install elasticsearch
$ sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head

Open up the browser and see Elastic Search GUI

$ open http://localhost:9200/_plugin/head/

Install all the dependencies

npm install

Change db setting if you wish, you would also need to reflect the same changes to config/default.coffee

$ cd scripts/config

Initialize mongo db with predefined data

$ cd ../
$ ./setupMongodb.coffee

And you are good to go.

How to Run

$ coffee app.coffee

or

$ node app.js

Scripts Explained

Test scripts

Kicks off end to end tests with karma

$ ./e2e-test.sh

Kicks off unit tests with karma

$ ./test.sh

MongoDb scripts

The script uses node-config package to read the configs based env.
By default, the script will read default.coffee for properties.

Please refer to https://github.com/lorenwest/node-config if you wish to set config for different envs.

setupMongodb.coffee read config/default.coffee and creates the db with the given name @ given host.
It will create the user with the given password.
After that, it will create and load collections defined in the config from data/ directory.

$ coffee setupMongodb.coffee

loadModelData.coffee is used to load individual collection

$ coffee loadModelData.coffee <modelName> [dataFilename]

Makefile

Clean up useless files and compile .coffee -> .js, .less -> .css, .jade -> .html

$ make

Compile for production ( does not work yet )

$ make production

Clean up

$ make clean

You can also run make coffee, make jade, make less to compile these extensions individually

restaurantcms's People

Contributors

wchen02 avatar

Stargazers

Pantelis Koukousoulas avatar  avatar  avatar

Watchers

 avatar James Cloos avatar

Forkers

guyt101z

restaurantcms's Issues

postinstall script for Makefile does not work

When coffee tries to compile .coffee to .js, it encounters:

File not found: ../public/js/angular

The reason is because, angular is pointing to an absolute symbolic link. And the path does not exist when installed on another machine.

angular -> /home/wchen/WebstormProjects/restaurantCMS/angular/

Suggested solution, make a symbolic link with relative path

angular -> ../../angular/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.