Skip to content

prisma site builder in angular

Andrew S Southwick edited this page Jul 26, 2019 · 7 revisions

CMS Built on Angular and Prisma GraphQL

  1. Clone the project
  2. NPM Install

The corresponding server is found at

prism cms

  1. Click to clone server project

On server project

  1. npm install -g prisma
  2. docker-compose up -d
  3. prisma deploy
  4. prisma generate
  5. node index.js or nodemon index.js

I'm taking some liberties believing that you have node installed.

After the project is running create a user on the gql query GUI

  1. got to localhost:4000
  2. run this mutation in the GUI mutation{ createUser(name: "<NAME OF USER>" email: "<EMAIL FOR USER>" hashed: "<PWD>){ id } }

on angular project

  1. Copy the created user id and navigate to the page service in the Angular project and paste in as the id variable in the createNewPage function

createNewPage (title): Observable<any> { return this.apollo.mutate({ mutation: this.createPage, variables: { title: title, ** id: 'cjygedbef001k0847vi3jd2yx'** } }).pipe(map(({data}) => data)); }

  1. Navigate to the localhost:4200/dashboard or the port your Angular app is running on
  2. Create a page