Code Monkey home page Code Monkey logo

node-elm-api's Introduction

简体中文 | English

前言

基于 node.js + mongodb 构建的后台系统,为nuxt-elm提供接口服务。

如遇网络不佳,请移步国内镜像加速节点

效果演示

前端网址请戳这里(请用chrome手机模式预览)

移动端扫描下方二维码

API接口文档

接口文档地址(基于apidoc)

技术栈

nodejs + express + mongodb + mongoose + pm2

项目运行


git clone [email protected]:EasyTuan/node-elm-api.git

cd nuxt-elm

npm install

npm run dev

1.2 开发过程

1.2.1 命令

# 开发
npm run dev

# 启动mongodb(确保已经安装了mongodb)
npm run mongod

# 开启浏览器GUI界面查看mongodb(默认端口1234)
npm run mongo

# 生成api文档(基于apidoc)
npm run doc

# 生产部署(pm2进程守护)
npm run start

目标功能

  • 商家列表 -- 完成
  • 购物车功能 -- 完成
  • 餐馆食品列表页 -- 完成
  • 店铺评价页面 -- 完成
  • 商家详情页 -- 完成
  • 登录、注册 -- 完成
  • 修改密码 -- 完成
  • 个人中心 -- 完成
  • 红包 -- 完成
  • 收货地址 -- 完成

目录结构

├── config                          // 配置文件
│   ├── default.js                  // 默认配置
│   └── development.js              // 开发环境
├── controller                      // 处理中心,负责路由及数据库的具体操作
│   ├── common
│   │   ├── homeData.js             // 首页数据
│   │   └── position.js             // 根据ip获取位置
│   ├── shopping
│   │   ├── business.js             // 餐馆详情
│   │   └── restaurants.js          // 商家列表
│   └── user
│       ├── address.js              // 用户地址
│       └── user.js                 // 用户中心
├── doc                             // apidoc自动生成的静态文档
├── InitData                        // 模拟数据
│   ├── business.js
│   ├── home.js
│   └── restaurants.js
├── models                          // 模型(数据库)
│   ├── common
│   │   └── common.js               // 通用模型
│   ├── shopping
│   │   ├── business.js             // 餐馆详情模型
│   │   └── restaurants.js          // 商家列表模型
│   └── user
│       ├── address.js              // 用户地址
│       └── user.js                 // 用户中心
├── mongodb                         // 连接数据库
│   └── db.js
├── public                          // 静态资源目录
├── routes                          // 路由配置
│   ├── common.js                   // 通用
│   ├── index.js                    // 路由配置主文件
│   ├── shopping.js                 // 餐馆、食品
│   └── user.js                     // 用户中心
├── screenshots                     // 项目截图
├── .babelrc 
├── .gitignore
├── app.js                          // 基础配置
├── COPYING                         // GPL协议
├── index.js                        // 入口文件
├── package.json
└── README.md                  

部分截图展示

首页展示

个人资料

我的

订餐

商家评价

说明

如果对您有帮助,您可以点右上角 "Star" 支持一下 谢谢! ^_^

或者您可以 "follow" 一下,我会不断开源更多的有趣的项目

开发环境 macOS 10.13.4 nodejs 8.11.3 Mongodb 4.0.1

部署环境 AWS CentOS 6.8 64位

如有问题请直接在 Issues 中提,或者您发现问题并有非常好的解决方案,欢迎 PR 👍

赞助

如有帮助,欢迎赞助

收到赞助款后,我会及时更新赞助墙

友情链接

前端项目传送地址

License

GPL

node-elm-api's People

Contributors

easytuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-elm-api's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.