Git Product home page Git Product logo

netmodular's Introduction

.Net Core 模块化的前后端分离的快速开发框架

框架特点

1、模块化
2、前后端分离
3、多数据库任意切换(目前支持SqlServer、MySql、SQLite)
4、异步到底

Demo

地址:http://129.211.40.240:6220/

账户:admin
密码:admin

前端框架Demo(临时)

地址:http://progqx5cu.bkt.clouddn.com/skins/index.html#/
账户:admin
密码:admin

文档

1、开篇
2、快速创建一个业务模块
3、数据访问模块介绍

开发环境

服务端

IDE:vs2017+
框架:.Net Core 2.2+
数据库:MSSQL、MySql、SQLite

前端

IDE:vscode
框架:Vue.jsElement-UI

架构图

运行方式

1、找到sample/Blog/data目录,按需要创建对应数据库(目前只上传了SqlServer和MySql,建议使用MySql)

需要注意的时,在linux的docker中mysql默认启用了区分大小写,需要关闭

2、打开sample/Blog/src/WebHost/conifg/db.json文件,配置数据库连接

{
  //是否开启日志输出,日志中包含ORM生成的Sql语句
  "Logging": false,
  "Connections": [
    {
      //模块名称
      "Name": "Admin",
      //数据库类型:0、SqlServer 1、MySql 2、SQLite
      "Dialect": 1,
      //数据库名称
      "Database": "Nm_Admin",
      //连接字符串
      "ConnString": "Server=localhost;Database=nm_admin;Uid=root;Pwd=root;Allow User Variables=True;charset=utf8;SslMode=none;"
      //SqlServer连接字符串需要配置MultipleActiveResultSets=true
      //"ConnString": "Server=.;Database=Nm_Admin;Uid=sa;Pwd=sa;MultipleActiveResultSets=true;"
    },
    {
      "Name": "CodeGenerator",
      "Dialect": 1,
      "Database": "Nm_CodeGenerator",
      "ConnString": "Server=localhost;Database=nm_codegenerator;Uid=root;Pwd=root;Allow User Variables=True;charset=utf8;SslMode=none;"
    },
    {
      "Name": "Blog",
      "Dialect": 1,
      "Database": "Nm_Blog",
      "ConnString": "Server=localhost;Database=nm_blog;Uid=root;Pwd=root;Allow User Variables=True;charset=utf8;SslMode=none;"
    }
  ]
}

3、进入 sample/Blog/src/WebHost/ 目录,使用控制台运行 dotnet watch run 命令

启动后端

4、在WebHost项目的wwwroot目录中已经包含了前端打包后的资源文件,如果不需要调试前端代码,可以直接访问http://localhost:6220/

如果想调试前端代码的话,进入 sample/Blog/src/UI/nm-module-blog 目录,执行以下命令启动前端

npm update  
npm run serve

启动前端

然后打开浏览器,输入http://localhost:5220/进行浏览

5、可访问 http://localhost:6220/swagger/index.html 查看接口文档

netmodular's People

Contributors

iamoldli avatar

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.