- Description
- Database
- Install
- Database Visualisation
- Packages
- Wiki
- License
This is my matching app I made for Project tech. This is a project for my study Communication and Multimedia Design at the Amsterdam University of Applied Sciences. Travelbuddy is a matching app that has a focus on people who like to travel and are adventurous. People can find their own travelbuddy with the same interest and go on a journey together.
I use Mongoose with the MongoDB Compass app.
-
Open the terminal
-
Clone the repository
git clone https://github.com/pepijnkok/blok-tech
- Go to the cloned repository repository
cd /blok-tech
- Make an .env file
touch .env
- Install the packages
npm install
- Start the application
node server.js
This is the datamodel that I use for my database.
const mongoose = require('mongoose');
// Using a validator to validate the email
const validator = require('validator');
// Structure for the collection
const Schema = mongoose.Schema;
// Source: https://mongoosejs.com/docs/guide.html
// Making a new Schema
const userSchema = new Schema({
name: {
type: String,
required: true,
unique: true
},
email: {
type: String,
required: true,
unique: true,
lowercase: true,
validate: (value) => {
return validator.isEmail(value);
}
},
password: {
type: String,
required: true,
unique: true
}
});
These are the packages that I used in this project
-
Express https://expressjs.com
-
Body Parser https://www.npmjs.com/package/body-parser
-
Mongoose Validator https://www.npmjs.com/package/mongoose-validator
Ik heb de volgende wiki aangemaakt waarin al mijn bevinden en onderzoek staan van dit project https://github.com/pepijnkok/Blok-Tech/wiki