keystonejs

DAY05 日常

两盒软妹~` 提交于 2020-11-08 14:59:25
不知不觉变成了工作日记……确实,宅在家里除了吃喝玩,不就是工作 (学习) 。今天春节延期、开工日延后,鉴于14天的潜伏期,至少要元宵后才能正常上班了。。。 今天专门翻看了清华的《人工智能发展报告2019》中的信息检索与推荐一章,整理了一些关键的知识点,分享给大家: - 信息检索 R.Baeza-Yates 教授在《现代信息检索中》中指出,信息检索主要研究如何为用户访问他们感兴趣的信息提供各种便利的手段,即:信息检索涉及对文档、网页、联机目录、结构化和半结构化记录及多媒体对象等信息的表示、存储、组织和访问,信息的表示和组织必须便于用户访问他们感兴趣的信息。 - 推荐系统 推荐系统是指信息过滤技术,从海量项目(项目是推荐系统所推荐内容的统称,包括商品、新闻、微博、音乐等产品及服务)中找到用户感兴趣的部分并将其推荐给用户,这在用户没有明确需求或者项目数量过于巨大、凌乱时,能很好地为用户服务,解决信息过载问题。 - 搜索+推荐=? 信息检索应用最广泛的就是搜索引擎,需要用户主动提供准确的关键词来寻找信息。但是比如当用户无法找到准确描述自己需求 (兴趣) 的关键词时,搜索引擎就无能为力了。而推荐系统则不需要用户提供明确的需求,它是通过分析用户的历史行为给用户的需求 ( 兴趣) 建模,从而主动推荐给用户能够满足他们需求 (兴趣) 的信息。 从某种意义上说

How can one upload an image to a KeystoneJS GraphQL endpoint?

末鹿安然 提交于 2020-05-17 07:01:34
问题 I'm using TinyMCE in a custom field for the KeystoneJS AdminUI, which is a React app. I'd like to upload images from the React front to the KeystoneJS GraphQL back. I can upload the images using a REST endpoint I added to the Keystone server -- passing TinyMCE an images_upload_handler callback -- but I'd like to take advantage of Keystone's already-built GraphQL endpoint for an Image list/type I've created. I first tried to use the approach detailed in this article, using axios to upload the

How to add Custom plugins into KeystoneJS Admin UI ?

大城市里の小女人 提交于 2020-01-24 12:58:04
问题 Is there a way to add custom plugins to KeystoneJs Admin UI without messing around with the source code too much. 回答1: many people want this kind of functionality — there are a bunch of open issues on github: #2088 – 0.4: How do I create new Field Types for KeystoneJS v0.4? #1898 – Plugin Architecture #1386 – FieldType "plugins" #1137 – Cannot find ways to add a custom button or links in Admin UI this is not possible in 0.3 without modifying the keystone source code, although keystone-custom

Keystone+React: 'import' and 'export' may appear only with 'sourceType: module'

送分小仙女□ 提交于 2020-01-17 03:58:26
问题 After updating the project dependencies I started facing the error. Browserify has problem parsing my JS code, which is written in ES6. Browserify seems to expect ES5. I don't understand, why the sourceType: module seems to be the issue here. Source: var babelify = require('babelify'); var browserify = require('browserify-middleware'); var keystone = require('keystone'); var importRoutes = keystone.importer(__dirname); // Setup Route Bindings exports = module.exports = function(app) { app.use

Keystone JS/Node js - multi-tenant SaaS application

北慕城南 提交于 2020-01-14 03:37:10
问题 I am trying to design a multi-tenant SaaS application and I am using Keystone js (Node JS framework) which uses Mongo Database. The model that I want to use is Physical Separation of Data: This approach separates the data by provisioning different database for different tenants/clients. This helps us to scale our application as the number of clients grows and also scale the database as per the clients need. The problem is I dont know how to configure or create a settings on Keystone that

Jade template doesn't get the data passed from express

三世轮回 提交于 2020-01-05 05:36:06
问题 I know this questions has almost the same title but the issue is different. I'm using Jade template engine v.1.11.0 built into latest Keystone.js release. In a controller, I query the data with two view.on('init') callbacks. First callback only queries one record and always passes. The second sometimes don't. category.js var keystone = require('keystone'); var async = require('async'); exports = module.exports = function (req, res) { var view = new keystone.View(req, res); var locals = res

Using S3File for images in KeystoneJS

谁说胖子不能爱 提交于 2020-01-02 19:29:10
问题 I'd like to know if it's possible, and how much of an effort it would be to use S3File as an image field in KeystoneJS. My testing indicates that while you can indeed upload an image to an S3File, the admin interface treats it as an arbitrary file. The thing I'm missing the most is a preview function like Types.CloudinaryImage provides. Is the autogenerated admin interface easily extensible without it being ugly hacks? Or is it meant to be left untouched because of the simple fact that it

KeystoneJS signin

纵然是瞬间 提交于 2020-01-02 13:47:13
问题 I am creating a keystone project and I need to provide allow or not allow users to access using the keystone signin. However, I found that keystoneJS sends a form data with email, password and csrf. This csrf is given to the user when he access to the login page. Nevertheless, what I need to do is to comunicate externally to login the user, by using an API. How can I generate the _csrf? Is there another way then generate two requests? Thanks 回答1: @Sericaia, you didn't include any code or

Where do I put my Node JS app so it is accessible via the main website?

可紊 提交于 2019-12-29 02:03:11
问题 I've recently installed a nodejs app (keystone) app in my home/myusername/myappname directory. When I visit www.mydomain.com, nothing displays - even after turning on my nodejs app. Where should these files be? I am running ubuntu 16.04. In the past I have worked with a var/www folder, but I am not using apache - do I need to manually create this folder? Thanks! 回答1: For your app to be visible it has to be running (obviously) and accessible on port 80 (if you want it to be available without

Keystone.js Not able to upload same file again

ぐ巨炮叔叔 提交于 2019-12-25 07:46:28
问题 I am uploading the same name file again but it is showing 'Field Error '. I have checked the log it is due to unique File name error . But I do not want to change the name of the file . Anyone having any solution for that. I am using keystone framework 来源: https://stackoverflow.com/questions/42974929/keystone-js-not-able-to-upload-same-file-again