-
Notifications
You must be signed in to change notification settings - Fork 27
Getting Started
Want to get started with saywat? Read on.
You will need these tools to run saywat locally:
I will refer to the folder D:\Tools\MongoDB\
where I have unzipped the contents of the MongoDB installer in the rest of this guide. You may have used a different location, but I highly recommend using a folder which requires non-administration rights as it needs write permissions to the directory.
Some other features of saywat:
- ExpressJS MVC framework read more
- Jade template engine - If you have seen HAML syntax it will probably feel familiar, but this may be a learning curve for people used to having angle brackets to guide their eyes. read more
- Mongoose - the MongoDB data access library read more
Once you have downloaded the tools and cloned the repository to your computer, you can run the app locally:
- open an command prompt
- navigate to
D:\Tools\MongoDB\
- you should see something like this:
D:\Tools\MongoDB>ls
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 6/04/2012 11:36 AM bin
-a--- 19/03/2012 3:22 PM 35181 GNU-AGPL-3.0
-a--- 19/03/2012 3:22 PM 1364 README
-a--- 19/03/2012 3:22 PM 10112 THIRD-PARTY-NOTICES
- create the data directory:
mkdir data\db
- add a config file named
saywat.txt
to the directory. It should contain these settings:
dbpath = .\data\db\
bind_ip = 127.0.0.1
noauth = true # use 'true' for options that don't take an argument
verbose = true # to disable, comment out.
- start the MongoDB daemon with the config file:
.\bin\mongod.exe --config saywat.txt
- to stop the server, press
CTRL + C
.
- open a command prompt
- navigate to the folder containing the code
- ensure the dependencies for the application are installed using npm:
npm install
- run the application:
node app.js
- point your browser at
http://localhost:3000
to see the home page.
- First you need to install the development dependencies using npm:
npm install -d
- Then simply run
npm test
to run the tests defined in the/test
folder - You can also run jshint over the code with
hint.cmd
ornode utils\hint
which will help you spot bugs and ensure you are matching the coding style used in the rest of the site.
The syntax highlighting will definitely help:
Have a look at the Trello board for this week - some basic ideas up there based on the workflow and mockups discussed earlier but these will likely evolve over time.
Contact the people in the Code52 JabbR chatroom if you would like to get write access to the board and start working on features!