This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
- Introduction
- Installing Node.js
- Installing MySQL
- Setting-up the project
#!/usr/bin/env sh | |
# checks to see if running | |
launchctl list | grep mongo | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist | |
launchctl remove homebrew.mxcl.mongodb | |
pkill -f mongod |
var x = []; | |
for (var i = 0; i < 56; i++) { | |
x.push(new Uint8Array(1024 * 1024 * 1024)); | |
} | |
console.log(x.length); |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema, | |
bcrypt = require('bcrypt'), | |
SALT_WORK_FACTOR = 10; | |
var UserSchema = new Schema({ | |
username: { type: String, required: true, index: { unique: true } }, | |
password: { type: String, required: true } | |
}); |
// | |
// MIT License | |
// | |
// Copyright (c) 2018 Ali Sharif | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |