• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

gothinkster/koa-knex-realworld-example

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

gothinkster/koa-knex-realworld-example

开源软件地址:

https://github.com/gothinkster/koa-knex-realworld-example

开源编程语言:

JavaScript 98.9%

开源软件介绍:

RealWorld Example App

Example Node.Js (Koa.js + Knex) codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.

This repo is functionality complete — PRs and issues welcome!

This codebase was created to demonstrate a fully fledged fullstack application built with Koa.js + Knex including CRUD operations, authentication, routing, pagination, and more.

We've gone to great lengths to adhere to the Koa.js + Knex community styleguides & best practices.

For more information on how to this works with other frontends/backends, head over to the RealWorld repo.

Getting started

Installation

  1. Instal Node.JS latest version
  2. Clone this repo
  3. Install dependencies, just run in project folder: npm i or yarn

Usage

  1. run npm start to start server

Testing

  1. run npm test for tests

Server Configuration (optional)

You can use .env file, to configure project like this:

NODE_ENV = development
PORT = 3000
SECRET = secret
DB_CLIENT = sqlite3
#DB_CONNECTION = postgres://user:password@localhost:5432/db_name

you can just copy .example-env

Variables description

NODE_ENV - specify env: development/production/test. development by default

NODE_PORT - specify port: 3000 by default

SECRET - custom secret for generating passwords. secret by default

DB_CLIENT - database to use. pg - postgress or sqlite3. sqlite3 by default

DB_CONNECTION - db connection string for postgress database.

Fixtures (optional)

  1. load fixtures: npm run db:load (it uses settings from .env). Don't forget to set NODE_ENV.

Styleguide

Standard - JavaScript Style Guide

How it works

Describe the general architecture of your app here




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
zadzbw/koa2-cors: CORS middleware for koa2发布时间:2022-06-24
下一篇:
pinojs/koa-pino-logger: 发布时间:2022-06-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap