Hey I'm working on a startup and I've got to build a simple database using Node.Js and Mongo (front end is HTML5/webGL). Basically we've got some investors lined up but before we pull the trigger I want to show them some server interaction. I do graphic design/business side and my partner is the technical side, but because we're both moonlighting time is limited and I need a backend asap. Last 24 hours I've gotten pretty familiar with Node.JS and Mongo and done a few tutorials, and I basically need to bring it together now and develop the schema and actually start building my database (please excuse me if terminology is off, I'm new).
I'm looking for some resources/intro/tutorials/direction on this part and I was wondering if you guys have some suggestions, links, youtube, whatever. Any help is appreciated. Thanks.
This is basically what I' trying to accomplish (maybe that helps):
client -> server
{
"request": "listProjectsQuery",
"uuid": "fdsldkjfaldjshf"
}
server -> client
{
"request": "listProjectsResponse",
"projects": [
"projID001",
"projID001",
"projID001",
"projID001"
]
}
client -> server
{
"request": "projectQuery",
"uuid": "123oiu4y1o23iuy4",
"projectID": "projID001"
}
server <-> client
{
"request": "projectData",
"uuid": "123oiu4y1o23iuy4",
"projectID": "projID001",
"name": "projName",
"bricks": [{
"xPos": 123,
"yPos": 123,
"width": 123,
"height": 123,
"brickName": "soundCloud",
"url": "http://www.purple.com",
"zPos":1
},
{
"xPos": 123,
"yPos": 123,
"width": 123,
"height": 123,
"brickName": "soundCloud",
"url": "http://www.purple.com",
"zPos":0
}]
}
If this is your first time building a node.js / mongodb server, I highly suggest you look at express.js and mongoose.js.
In general, I find one of the best ways to learn is to look at sample projects on GitHub. Just looking around for a sample project located the one here which seems to use most of the best practices and should give you a good idea on how to get started.