Giter Club home page Giter Club logo

Comments (9)

jiayisheji avatar jiayisheji commented on August 21, 2024

@sucof
admin是最早弄的,开始调试了登陆就没有管了,web把路由页面弄完,现在主要在弄service,也改了很多次了,现在基本稳定了,还有些细节慢慢调整。你会发现service文档很全,web和admin都是cli安装信息。

from jianshu.

sucof avatar sucof commented on August 21, 2024

但是clone下大大的项目,service确实缺少utils-service/utils.service,infinitescroll/infinitescroll.directive,删除了相关应用代码后,再利用npm start后,输出为:
`> [email protected] start /home/ro4k/jianshu/service

npm run build && npm run watch

[email protected] build /home/ro4k/jianshu/service
npm run build-ts && npm run tslint

[email protected] build-ts /home/ro4k/jianshu/service
tsc

5:28:27 PM - Compilation complete. Watching for file changes.`
但是http://localhost:3000没有反应;
使用的步骤也是按照文档的说明进行:
进入目录

cd service
安装依赖

npm install
安装mongoDB数据库

连接MongoDB教程

启动数据库

启动服务器

npm start
mongodb也都正常运行了,也进行了测试,请问我出错在什么地方了吗?

from jianshu.

jiayisheji avatar jiayisheji commented on August 21, 2024

@sucof
以前是可以访问页面的,因为这几天调整了结构, 目前http://localhost:3000没有绑定页面,现在我只在postman调试api接口,npm start已经启动了服务。这个项目是前后分离开发的,不然不会有这么独立工程。

from jianshu.

sucof avatar sucof commented on August 21, 2024

谢谢答复 @jiayisheji ,我的测试如下

  1. admin工程是没有问题;
  2. service服务端的api数据无法访问,是不是调整结构的时候产生了一些笔误?因此在我这类似http://localhost:3000/api/v1/admin/login 这样的接口无法获取到数据;
  3. web工程的话缺少utils-service和infinitescroll目录下的utils.service.ts和infinitescroll.directive.ts两个文件,注释这两个文件的相关代码能运行web工程,修复掉一些笔误,能运行,但是样式什么都是乱的,不知道utils.service.ts是什么功能,而infinitescroll.directive.ts字面的功能就是无限滚动加载,去掉应该问题不大吧?

不得不感慨一句,大大的学习能力真强,竟然是从零开始的

from jianshu.

jiayisheji avatar jiayisheji commented on August 21, 2024

@sucof
2. 我还没有admin模型,所以admin现在api是空的。
3. web那两个文件我没有提交github,一个工具服务,一个滚动加载,因为简书都是滚动加载数据的,所以我在试着写一个滚动指令,写了一半,有些问题,就没有提交。样式乱的,因为的我用postcss,angular-cli是不支持的,需要改源码的才行,可以看doc/web初始化
最下面有怎么修改源码支持,默认支持scss,less一些常用的,如果你不喜欢postcss,可以自己修改其他处理器。

from jianshu.

sucof avatar sucof commented on August 21, 2024

好的,再补充两个问题:

  1. 在service工程中仍然存在的大小写问题:
    import {default as Template, TemplateModel} from "../models/template的template应该为Template,import {default as Corpus, CorpusModel, formatData} from "../models/corpus的corpus应为Corpus;
  2. 文章模块的API应该没写好吧,但是在web工程的代码中已经有使用类似/api/v1/article/5933fa3183e1e940b468743d/conmments的代码,另外conmments多打了个n

from jianshu.

jiayisheji avatar jiayisheji commented on August 21, 2024

@sucof

  1. Template是个模板栗子,后面写的模型,控制器,路由,就和这个类似。
  2. 文章API要重新整理,这个周末会重新整理web端结构。要开始完成1期目标,注册登录。

from jianshu.

sucof avatar sucof commented on August 21, 2024

嗯,等着看明白了大大的结构,希望能帮上小忙。
另外,web端按照大大的说明弄好postcss后,主页显示是没问题的,但其它web页依然是显示有问题的。

from jianshu.

jiayisheji avatar jiayisheji commented on August 21, 2024

@sucof 本来就没有怎么写样式,现在只是按照简书把路由全部搭出来了,里面大概内容都有了,接来下就绑定数据和写样式了。

from jianshu.

Related Issues (12)

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.