Questions tagged [keystonejs]

742 questions
3
votes
1 answer

How to use the Keystone.js admin api (unauthed) in my app?

I was taking a look at this the docs on the admin api and realized that it perfectly solves my case of using Keystone to power a SPA. However, I can't figure out a way to access the admin api routes from the api routes that I'm building without…
thewolff
  • 571
  • 4
  • 20
3
votes
3 answers

Keystonejs 4.0 File system storage adapter image preview

How do I get an image preview for a Types.File field in the admin UI. It says "The FS adapter supports all the default Keystone file schema fields. It also additionally supports and enables the filename path (required)." However when I try…
doneDone
  • 121
  • 2
  • 7
3
votes
1 answer

Is it possible to user custom authentication in keystone.js without a keystone user model?

I have a (I hope) quick question regarding Authorization in Keystone: it seems like the "User" object is a core dependency in the framework. I'd like to side-step it completely but there doesn't seem to be a way to get the application functional…
Daniel B. Chapman
  • 4,647
  • 32
  • 42
3
votes
1 answer

Undefined 'model' property of Keystonejs List object

I created an example with a very simple list (of countries) and created api routes based on the instructions found here: https://gist.github.com/JedWatson/9741171 server.js: app.get('/api/countries', keystone.middleware.api,…
Sebastian
  • 1,808
  • 2
  • 12
  • 13
3
votes
1 answer

Handlebars Scope Issue: Can't access template variable from embedded `each`

I am trying to figure out why I can't access my template variables from within an embedded each statement in my handlebars template (rendered within my keystone project). I have read numerous issues here on StackOverflow with similar problems, but…
radiovisual
  • 6,298
  • 1
  • 26
  • 41
3
votes
1 answer

Mongoose two level population using KeystoneJs

I need to populate two levels down with Mongoose / Keystone, but have hit a road block. I have 3 models: Region, Country and City. Regions contains countries and countries contain cities. My models: Model Region: var Region = new…
ChrisRich
  • 8,300
  • 11
  • 48
  • 67
3
votes
0 answers

beginner: Memory usage on a stock install

When running a stock standard keystone install (via generator-keystone), its memory usage seems to be between 200-500mb. This is actually enough to crash the process on a new 512mb digitalocean vps I have created specifically to test whether this…
squishdish
  • 31
  • 2
3
votes
0 answers

sending post request in keystonejs on index.js

I have a contact form that I added to my index.jade file and I am trying to send a post request to the / route using the following code in the jade template which renders fine. if enquirySubmitted .row h3 Thanks for getting in touch. else …
Bazinga777
  • 5,140
  • 13
  • 53
  • 92
3
votes
1 answer

Deploying new node.js keystoneJS app on Digital Ocean

I am close to deploying my first node app (KeystoneJS) + mongoDb and I was thinking of using Digital Ocean. This would be the first node app I have deployed and first time using Digital Ocean. I've tried to find tutorials or guides from other people…
Kevin Dark
  • 2,139
  • 5
  • 22
  • 23
3
votes
1 answer

Creating an environmental variable within Docker container when starting up

How would I get the ip address of a mongo container and set it as environmental variable when creating a node image? I've been running into an issue with conflicting tech stacks: keystone.js, forever, and docker. My problem is that I need to set up…
3
votes
2 answers

KeystoneJS - Create new Item throws duplicate key error

I have seen some similar questions related to this but have not found an answer. I am attempting to create a Gallery in my Keystone Project that is similar to a post, where there will be a list of galleries and in it a gallery with a set of selected…
Codermonk
  • 883
  • 16
  • 32
3
votes
1 answer

Keystonejs how to access models in a template

I created a new model and it's showing on admin ui, but how i can acces it from a template? var keystone = require('keystone'), Types = keystone.Field.Types; var Content = new keystone.List('Content', { map: {name: 'title'}, autokey:…
ALoppu
  • 65
  • 2
  • 10
3
votes
1 answer

Keystone.js Admin UI - no fields in a form

I've created such a model: var keystone = require('keystone'), Types = keystone.Field.Types; var Page = new keystone.List('Page', { autokey: { path: 'slug', from: 'menuTitle', unique: true }, map: { name: 'menuTitle' }, }); Page.add({ …
Eugene
  • 655
  • 7
  • 16
3
votes
2 answers

Calling a function on each in Jade

I'm trying to implement Google maps in a Jade template. Using KeystoneJS as a CMS, I have a number of "profiles" (basically people with their addresses) that I want to add to a map as markers. block js script. var map; function…
Ventis
  • 488
  • 6
  • 22
2
votes
5 answers

KeystoneJS 6 - graphQLSchemaExtension - No session

I have an issue with graphQLSchemaExtension I don’t have active session on my custom mutations.. An example below of the beginning of custom mutation And my graphQLSchemaExtension declaration And my Keystone.ts file On my generic queries/mutations…