Scrum Master:
Product Owner:
Dev Team:
Josh Stevens
Brian Boyko
Vaishnavi Reddy
Peter Do
Daniel Moser
Adventure Awaits
You are backpacking across Europe, but one night, your plans fall through. So you'd like to hang out with people and be social. But you don't know anyone locally.
Where can you meet up with someone who would like to talk, even through language and cultural barriers, just for some conversation?
amiGo: A website where people can find other travelers in the same city at the same time for swapping travel stories in public places, and for finding other people who share your interests while traveling.
module.exports = function(knex) {
return {
addTrip: function(destination, geocode_latitude, geocode_longitude, timeStart, timeEnd) {
return knex('trips')
.insert({
'dest_name': destination,
'geocode_latitude': geocode_latitude,
'geocode_longitude': geocode_longitude,
'time_start': timeStart,
'time_end': timeEnd
});
},
getTripsById: function(id) {
return knex('users')
.innerJoin('users_trips', 'users.id', 'users_trips.user_id')
.innerJoin('trips', 'trips.id', 'users_trips.trip_id')
.where('users.id', id)
.select('username', 'dest_name', 'geocode_latitude',
'geocode_longitude', 'time_start', 'time_end');
},
...
// Making Trips
app.post('/api/createTrip', isLoggedIn, function(req, res) {
Trips.addTrip(req.body.destination, req.body.geocode_latitude, req.body
.geocode_longitude, req.body.start, req.body.end)
.then(function(response) {
res.send(response);
});
});
// controllers
app.get('/controllers/trips.js', function(req, res) {
res.sendfile('controllers/trips.js');
});
app.get('/controllers/profile.js', function(req, res) {
res.sendfile('controllers/profile.js');
});
app.get('/controllers/friends.js', function(req, res) {
res.sendfile('controllers/friends.js');
});
<div ng-controller="MakeTrips">
<div class="col-md-12">
<div class="col-md-6">
<h3>ng-controller="MakeTrips"</h3>
<form type="submit">
<p><label>Destination:</label><input ng-model="destination"></p>
<p><label>Start Time:</label><input ng-model="start" type="date"></p>
<p><label>End Time:</label><input ng-model="end" type="date"></p>
<p><label>Trip Activities</label><input ng-model="activities"></p>
<p><label>Trip picture (URL)</label><input ng-model="tripPic"></p>
<button ng-click="makeTrip()">Make Trip</button>
</form>
</div>
<div class="col-md-6 response">
Response
<pre>
{{ response }}
</pre>
</div>
</div>
</div>