Create droplet of your liking (ubuntu 12.04 x32) Use an xx.04 LTS version
On Digital Ocean, create a DNS entry for your server (xyz.com)
Make sure it has NS records that use digital oceans nameservers
| /* eslint-disable prefer-template */ | |
| const path = require('path'); | |
| const aliases = require('./aliases'); | |
| // /////////////////////////////////////////////////////////////// | |
| // ////////////////// PLUGINS //////////////////////////////// | |
| // /////////////////////////////////////////////////////////////// | |
| const commonPlugins = [ |
Create droplet of your liking (ubuntu 12.04 x32) Use an xx.04 LTS version
On Digital Ocean, create a DNS entry for your server (xyz.com)
Make sure it has NS records that use digital oceans nameservers
| /* Exercise: Loops and Functions #43 */ | |
| package main | |
| import ( | |
| "fmt" | |
| "math" | |
| ) | |
| func Sqrt(x float64) float64 { | |
| z := float64(2.) |
| server { listen 80; | |
| server_name example.com; | |
| access_log /var/log/example.com/nginx.access.log; | |
| error_log /var/log/example.com/nginx.error.log; | |
| root /var/www/apps/example.com/public; | |
| charset utf-8; | |
| location / { | |
| rewrite ^ https://$host$request_uri? permanent; | |
| } |
Bookshelfjs ( http://bookshelfjs.org/ ) is a javascript ORM for Node.js This gist is a simple bookshelfjs sample.
npm run build in the local folderconfig.js.| var Promise = require('bluebird'), | |
| User = require('./user'), | |
| knex, query; | |
| knex = User.prototype._builder(User.prototype.tableName); | |
| query = function (q) { | |
| q.distinct() | |
| .innerJoin('orders', function () { | |
| this.on('users.id', '=', 'orders.user_id') |
knexjs ( http://knexjs.org/ ) is SQL query builder.
This gist is a simple knexjs sample.
npm run build in the local foldernode index.js --createSchema : Create the database schema. (The default SQL client is sqlite3. The schema is created by db_schema.js )Visit my blog or connect with me on Twitter
git init
or