A boilerplate for building RESTful APIs using Node.js, PostgreSQL, koa, knex, objection.
yarn
or npm install
user
WITH PASSWORD password
database
database
to user
Install citext
extension on your database with the command CREATE EXTENSION citext;
Change name value of .env.example to .env and set the key SECRET to any value you wish
Change DATABASE_URL to postgress://user
:password
@localhost
/database
Run migrations: yarn db:migrate
Run seeds: yarn db:seed
Install Docker
docker pull redis
docker run --name your-image-name -d redis
docker start your-image-name
yarn start
or yarn dev
to start serveryarn test
├── /src
| ├── /controllers
| ├── /database
| | ├── /migrations
| | ├── /seeds
| ├── /helpers
| ├── /middleware
| ├── /models
| ├── /routes
| ├── /validators
├── /test
To use the nodemailer helper in a non-production environment, you need to set the variable in .env ALLOW_LIST
and assign an array with the domains allowed for sending e-mail. This domain must start with an @
, followed by a minimum of 2 characters, a .
and 2 characters in the end.In case the informed email is not part of any informed domain, the email will not be sent.
ALLOWED
NOT ALLOWED
The following domains: nave.rs
and@nave
are not allowed as they do not satisfy the domain description, given above.
This project uses objection.js as ORM and knex as query builder.
In order not to use before update hooks on our models, we decided to create a function and trigger via migration, everytime you create a table with updated_at add the trigger to it. (an example is in the file: "src/database/migrations/20180910221504_init.js")
adapter
This is a very common question among newer React developers, and one question I had when I was starting out with React and Node.js. In this short example I will show you how to make create-react-app w
//原文地址: http://htmlemailboilerplate.com/ <!-- *************************************************** ******************************************************** HOW TO USE: Use these code examples as a
Bones A Lightweight Wordpress Development Theme Bones is designed to make the life of developers easier. It's built using HTML5 & has a strong semantic foundation. It's constantly growing so be sure t
taiga 是一个项目管理平台,它为做敏捷开发的程序员,设计师及项目管理员提供了界面漂亮且功能强大的工具。taiga 可以方便地任你定制所有项目,操作直观简单,界面漂亮,可个性地定制每个项目。 taiga-back 是用来管理 scrum 项目的 web应用程序,它采用了 Django 和 AngularJS 框架 (后端代码)。
当你从一个页面切换到另一个页面时,app.js将会有一段你曾经拥有的页面的历史,能够导航到它们。返回是应用程序的概念上的反转,加载在导航栏中返回到前一个页面加载(当导航完成时破坏当前页面)。 // load home // load page2 App.back(function () { // back to home // page2's appDestroy event has be
想要备份你的 Linux 系统吗?或许 Back In Time 就是为你而准备的工具。Back In Time 使用起来很简单,它从 FlyBack 和 TimeVault 身上获得了开发灵感,支持 Snapshot(快照式)备份,能够设定备份计划,让你在指定的时间完成系统备份,并提供有 GNOME 和 KDE 4 界面。 Back In Time 为你准备了 Ubuntu 和 Fedora 源
实现新视图弹出时,之前的视图变淡、缩小(即后退为背景视图)的动画效果。 [Code4App.com]
自定义导航条上面返回按钮(backbutton)的文字和颜色,以及自定义导航条的颜色和图片。 [Code4App.com]
本文向大家介绍Go-Back-N ARQ,包括了Go-Back-N ARQ的使用技巧和注意事项,需要的朋友参考一下 Go-Back-N自动重复请求(Go-Back-N ARQ)是一种数据链路层协议,它使用滑动窗口方法来可靠且顺序地传递数据帧。在滑动窗口协议的情况下,发送窗口大小为N,接收窗口大小为1。 工作原则 Go – Back – N ARQ使用协议流水线的概念,即在接收到第一个帧的确认之前发