简体   繁体   English

REST API的Web UI

[英]Web UI for a REST API

I wrote a REST API in Node.js (with Express)that implements a queue with some dequeue/enqueue functionality, and the next step is creating a web view for that API. 我在Node.js(带有Express)中编写了一个REST API,该API实现了具有一些出队/入队功能的队列,下一步是为该API创建Web视图。 I am really new to javascript and Node.js , can i have some pointers on how to implement it? 我真的是javascript和Node.js的新手,我可以对如何实现它有一些建议吗? is there a framework I can use to integrate the api.js i built with a front-end? 有没有可以用来集成我与前端构建的api.js的框架?

When you wrote a REST api using nodejs and the expressjs framework, you are perfectly prepared to use the complete MEAN stack, which implements angularJS for frontend services. 当您使用nodejs和expressjs框架编写REST api时,您完全准备使用完整的MEAN堆栈,该堆栈为前端服务实现了angularJS。

Angular offers a complete REST implementation (called ngResource). Angular提供了完整的REST实现(称为ngResource)。 Install via npm . 通过npm安装。

With the angular resource service you get your frontend interface (to interact with your backend) out of the box (except a few adaptations you'll have to make, eg to make it work with Mongoose, which is used to make the access to your MongoDB more comfortable). 使用angular资源服务,您可以开箱即用(与后端交互)前端接口(除了必须进行一些修改外,例如使其与Mongoose一起使用,该接口用于访问您的Mongoose)。 MongoDB更舒适)。

You'll find a few superb tutorials, as this one and others on scotch.io are some of them. 你会发现一些极好的教程, 这一个和其他人scotch.io是其中的一些。 Google for 'api rest angular resource mean ...' in different selections ;-) Google在不同的选择中提供“ api rest角资源均值...”;

Other links that helped me a lot: 其他对我帮助很大的链接:

  • Tutorial from Angular itself Angular本身的教程
  • Thinkster.io - complete MEAN stack overview with examples Thinkster.io-完整的MEAN堆栈概述和示例
  • a helpful tutorial with good examples from Frederik Dietz 弗雷德里克·迪茨(Frederik Dietz)的优秀示例,提供了有用的教程
  • Buecheler comes out with this great tutorial, but its more about the backend side - as you might check your code againt the basic standards of a REST backend implementation. Buecheler附带了这个很棒的教程,但它更多地涉及后端方面-您可能会再次检查代码,这是REST后端实现的基本标准。

Those are some of the links I noted and that could find ad hoc. 这些是我提到的一些链接,可以临时找到。

EDIT: As your headline suggests you are searching for an UI, I suppose IBM Strongloop might be a good hint for you. 编辑:正如您的标题所建议的那样,您正在搜索UI,我想IBM Strongloop对您来说可能是一个很好的提示。 IBM is strongly interconnected with the development of ExpressJS and offers this API and UI for probably all data concerning questions of your Webapp. IBM与ExpressJS的开发紧密地联系在一起,并为可能与Webapp问题有关的所有数据提供了该API和UI。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM