Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Commit

Permalink
rename Photon JS to Photon.js (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolasburk authored and timsuchanek committed Aug 12, 2019
1 parent 7cf2e13 commit 6fa2497
Show file tree
Hide file tree
Showing 35 changed files with 59 additions and 59 deletions.
22 changes: 11 additions & 11 deletions README.md
@@ -1,7 +1,7 @@
<br />
<p align="center"><a href="https://photonjs.prisma.io/"><img src="logo.svg" alt="Prisma" height="40px"></a></p>

<!-- <p><h1 align="center">Photon JS</h1></p> -->
<!-- <p><h1 align="center">Photon.js</h1></p> -->
<p><h3 align="center">Type-safe database client for TypeScript & Node.js (ORM replacement)</h3></p>

<p align="center">
Expand All @@ -18,11 +18,11 @@

<hr>

[Photon JS](https://photonjs.prisma.io/) is an **auto-generated database client** that enables **type-safe** database access and **reduces boilerplate**. You can use it as an alternative to traditional ORMs such as Sequelize, TypeORM or Knex.js
[Photon.js](https://photonjs.prisma.io/) is an **auto-generated database client** that enables **type-safe** database access and **reduces boilerplate**. You can use it as an alternative to traditional ORMs such as Sequelize, TypeORM or Knex.js

It is part of the [Prisma 2](https://www.github.com/prisma/prisma2) ecosystem. Prisma 2 provides database tools for data access, declarative data modeling, schema migrations and visual data management. Learn more in the [Prisma 2 announcement](https://www.prisma.io/blog/announcing-prisma-2-zq1s745db8i5/).

> Note that Photon JS is currently running in Preview. The version available has severe [limitations](https://github.com/prisma/prisma2/blob/master/docs/limitations.md) that make it unsuitable for production workloads, including missing features, limited performance and stability issues. We will address all these limitations before issuing a stable release later this year.
> Note that Photon.js is currently running in Preview. The version available has severe [limitations](https://github.com/prisma/prisma2/blob/master/docs/limitations.md) that make it unsuitable for production workloads, including missing features, limited performance and stability issues. We will address all these limitations before issuing a stable release later this year.
<br />

Expand Down Expand Up @@ -149,7 +149,7 @@ Learn more about the data model in the [docs](https://github.com/prisma/prisma2/

You can learn more about the Photon's API features on the [website](https://photonjs.prisma.io/) or in the [API reference](https://github.com/prisma/prisma2/blob/master/docs/photon/api.md).

## The Photon JS workflow
## The Photon.js workflow

### 1. Configure data source

Expand Down Expand Up @@ -228,7 +228,7 @@ If you want to use Photon with an existing database, you can [introspect](https:

When starting from scratch, you can simply write your own [data model definition](https://github.com/prisma/prisma2/blob/master/docs/data-modeling.md#data-model-definition) inside your [schema file](https://github.com/prisma/prisma2/blob/master/docs/prisma-schema-file.md). You can then use [Lift](https://github.com/prisma/lift) to migrate your database (Lift maps your data model definition to the schema of the underlying database).

### 3. Generate Photon JS
### 3. Generate Photon.js

<img src="https://i.imgur.com/rdtKEYL.png" width="453px">

Expand All @@ -246,19 +246,19 @@ Photon is generated based on the [data model definition](https://github.com/pris
- Relations and transactions
- Raw database access

Photon JS gets generated into your `node_modules` folder so you can import it directly from `'@generated/photon'`. There's no need to install any additional dependencies or database drivers.
Photon.js gets generated into your `node_modules` folder so you can import it directly from `'@generated/photon'`. There's no need to install any additional dependencies or database drivers.

### 4. Build an app

Similar to traditional ORMs, the Photon JS client can be used any of your Node.js or TypeScript application. For example to implement REST, GraphQL or gRPC APIs. You can find reference examples for these use cases in the [`examples`](./examples) directory.
Similar to traditional ORMs, the Photon.js client can be used any of your Node.js or TypeScript application. For example to implement REST, GraphQL or gRPC APIs. You can find reference examples for these use cases in the [`examples`](./examples) directory.

### 5. Evolve your database and Photon JS database client
### 5. Evolve your database and Photon.js database client

As you build your app, you'll likely migrate your database to implement new features. Depending on how you obtained your [initial data model](#2-define-initial-data-model) and whether or not you're using [Lift](https://github.com/prisma/lift), there might be two ways for evolving your application going forward.

#### Option A: Without Lift

If you're not using Lift, you need to re-introspect your database (to update the generated datamodel) and re-generate the Photon JS client after each schema migration:
If you're not using Lift, you need to re-introspect your database (to update the generated datamodel) and re-generate the Photon.js client after each schema migration:

```sh
prisma2 introspect
Expand All @@ -267,7 +267,7 @@ prisma2 generate

#### Option B: With Lift

When using Lift, you need to re-generate the Photon JS client immediately after you performed a schema migration:
When using Lift, you need to re-generate the Photon.js client immediately after you performed a schema migration:

```sh
# adjust data model definition in schema.prisma
Expand All @@ -278,7 +278,7 @@ prisma2 generate

## Supported databases

Photon JS can be used with the following databases:
Photon.js can be used with the following databases:

- SQLite
- MySQL
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
@@ -1,3 +1,3 @@
# Docs

You can find the documentation for Photon JS and other relevant parts of Prisma 2 [**here**](https://github.com/prisma/prisma2/tree/master/docs).
You can find the documentation for Photon.js and other relevant parts of Prisma 2 [**here**](https://github.com/prisma/prisma2/tree/master/docs).
2 changes: 1 addition & 1 deletion examples/.github/readmes/javascript/_setup-2.md
Expand Up @@ -22,7 +22,7 @@ You can now use the [SQLite Browser](https://sqlitebrowser.org/) to view and edi

### 4. Generate Photon (type-safe database client)

Run the following command to generate [Photon JS](https://photonjs.prisma.io/):
Run the following command to generate [Photon.js](https://photonjs.prisma.io/):

```sh
prisma2 generate
Expand Down
2 changes: 1 addition & 1 deletion examples/.github/readmes/javascript/cli-app/README.md
@@ -1,6 +1,6 @@
# Simple TODO-App Example (CLI)

This example shows how to implement a **TODO-app as a CLI tool** with Node.js and [Photon JS](https://photonjs.prisma.io/).
This example shows how to implement a **TODO-app as a CLI tool** with Node.js and [Photon.js](https://photonjs.prisma.io/).

__INLINE(../_setup-1.md)__
cd photonjs/examples/javascript/cli-app
Expand Down
2 changes: 1 addition & 1 deletion examples/.github/readmes/javascript/graphql-auth/README.md
@@ -1,6 +1,6 @@
# GraphQL Server with Authentication & Permissions

This example shows how to implement a **GraphQL server with an email-password-based authentication workflow and authentication rules** based on [Photon JS](https://photonjs.prisma.io/), [graphql-yoga](https://github.com/prisma/graphql-yoga) & [graphql-shield](https://github.com/maticzav/graphql-shield).
This example shows how to implement a **GraphQL server with an email-password-based authentication workflow and authentication rules** based on [Photon.js](https://photonjs.prisma.io/), [graphql-yoga](https://github.com/prisma/graphql-yoga) & [graphql-shield](https://github.com/maticzav/graphql-shield).

__INLINE(../_setup-1.md)__
cd photonjs/examples/javascript/graphql-auth
Expand Down
2 changes: 1 addition & 1 deletion examples/.github/readmes/javascript/graphql/README.md
@@ -1,6 +1,6 @@
# GraphQL Server Example

This example shows how to implement a **GraphQL server with JavaScript (Node.js)** based on [Photon JS](https://photonjs.prisma.io/) & [graphql-yoga](https://github.com/prisma/graphql-yoga).
This example shows how to implement a **GraphQL server with JavaScript (Node.js)** based on [Photon.js](https://photonjs.prisma.io/) & [graphql-yoga](https://github.com/prisma/graphql-yoga).

__INLINE(../_setup-1.md)__
cd photonjs/examples/javascript/graphql
Expand Down
2 changes: 1 addition & 1 deletion examples/.github/readmes/javascript/grpc/README.md
@@ -1,6 +1,6 @@
# gRPC Server Example

This example shows how to implement a **gRPC API with Node.js** and [Photon JS](https://photonjs.prisma.io/).
This example shows how to implement a **gRPC API with Node.js** and [Photon.js](https://photonjs.prisma.io/).

__INLINE(../_setup-1.md)__
cd photonjs/examples/javascript/grpc
Expand Down
2 changes: 1 addition & 1 deletion examples/.github/readmes/javascript/rest-express/README.md
@@ -1,6 +1,6 @@
# REST API Example

This example shows how to implement a **REST API** using [Express.JS](https://expressjs.com/de/) and [Photon JS](https://photonjs.prisma.io/).
This example shows how to implement a **REST API** using [Express.JS](https://expressjs.com/de/) and [Photon.js](https://photonjs.prisma.io/).

__INLINE(../_setup-1.md)__
cd photonjs/examples/javascript/rest-express
Expand Down
2 changes: 1 addition & 1 deletion examples/.github/readmes/javascript/script/README.md
@@ -1,6 +1,6 @@
# Simple Node Script Example

This example shows how to use [Photon JS](https://photonjs.prisma.io/) in a **simple Node.js script** to read and write data in a database.
This example shows how to use [Photon.js](https://photonjs.prisma.io/) in a **simple Node.js script** to read and write data in a database.

__INLINE(../_setup-1.md)__
cd photonjs/examples/javascript/script
Expand Down
2 changes: 1 addition & 1 deletion examples/.github/readmes/typescript/_setup-2.md
Expand Up @@ -22,7 +22,7 @@ You can now use the [SQLite Browser](https://sqlitebrowser.org/) to view and edi

### 4. Generate Photon (type-safe database client)

Run the following command to generate [Photon JS](https://photonjs.prisma.io/):
Run the following command to generate [Photon.js](https://photonjs.prisma.io/):

```sh
prisma2 generate
Expand Down
2 changes: 1 addition & 1 deletion examples/.github/readmes/typescript/cli-app/README.md
@@ -1,6 +1,6 @@
# Simple TODO-App Example (CLI)

This example shows how to implement a **TODO-app as a CLI tool** with TypeScript and [Photon JS](https://photonjs.prisma.io/).
This example shows how to implement a **TODO-app as a CLI tool** with TypeScript and [Photon.js](https://photonjs.prisma.io/).

__INLINE(../_setup-1.md)__
cd photonjs/examples/typescript/cli-app
Expand Down
@@ -1,6 +1,6 @@
# GraphQL Apollo Server Example

This example shows how to implement a **GraphQL server with TypeScript** based on [Photon JS](https://photonjs.prisma.io/), [apollo-server](https://www.apollographql.com/docs/apollo-server/) and [GraphQL Nexus](https://nexus.js.org/).
This example shows how to implement a **GraphQL server with TypeScript** based on [Photon.js](https://photonjs.prisma.io/), [apollo-server](https://www.apollographql.com/docs/apollo-server/) and [GraphQL Nexus](https://nexus.js.org/).

__INLINE(../_setup-1.md)__
cd prisma-examples/typescript/graphql-apollo-server
Expand Down
2 changes: 1 addition & 1 deletion examples/.github/readmes/typescript/graphql-crud/README.md
@@ -1,6 +1,6 @@
# CRUD GraphQL API Example

This example shows how to implement a **CRUD GraphQL API with TypeScript** based on [Photon JS](https://photonjs.prisma.io/), [graphql-yoga](https://github.com/prisma/graphql-yoga) and [GraphQL Nexus](https://nexus.js.org/).
This example shows how to implement a **CRUD GraphQL API with TypeScript** based on [Photon.js](https://photonjs.prisma.io/), [graphql-yoga](https://github.com/prisma/graphql-yoga) and [GraphQL Nexus](https://nexus.js.org/).

__INLINE(../_setup-1.md)__
cd photonjs/examples/typescript/graphql-crud
Expand Down
@@ -1,6 +1,6 @@
# GraphQL Server with Realtime Subscriptions Example

This example shows how to implement **GraphQL server with realtime subscriptions** based on [Photon JS](https://photonjs.prisma.io/) & [graphql-yoga](https://github.com/prisma/graphql-yoga).
This example shows how to implement **GraphQL server with realtime subscriptions** based on [Photon.js](https://photonjs.prisma.io/) & [graphql-yoga](https://github.com/prisma/graphql-yoga).

__INLINE(../_setup-1.md)__
cd photonjs/examples/typescript/graphql-subscriptions
Expand Down
2 changes: 1 addition & 1 deletion examples/.github/readmes/typescript/graphql/README.md
@@ -1,6 +1,6 @@
# GraphQL Server Example

This example shows how to implement a **GraphQL server with TypeScript** based on [Photon JS](https://photonjs.prisma.io/), [graphql-yoga](https://github.com/prisma/graphql-yoga) and [GraphQL Nexus](https://nexus.js.org/).
This example shows how to implement a **GraphQL server with TypeScript** based on [Photon.js](https://photonjs.prisma.io/), [graphql-yoga](https://github.com/prisma/graphql-yoga) and [GraphQL Nexus](https://nexus.js.org/).

__INLINE(../_setup-1.md)__
cd photonjs/examples/typescript/graphql
Expand Down
2 changes: 1 addition & 1 deletion examples/.github/readmes/typescript/grpc/README.md
@@ -1,6 +1,6 @@
# gRPC Server Example

This example shows how to implement a **gRPC API with TypeScript** and [Photon JS](https://photonjs.prisma.io/).
This example shows how to implement a **gRPC API with TypeScript** and [Photon.js](https://photonjs.prisma.io/).

__INLINE(../_setup-1.md)__
cd photonjs/examples/typescript/grpc
Expand Down
2 changes: 1 addition & 1 deletion examples/.github/readmes/typescript/rest-express/README.md
@@ -1,6 +1,6 @@
# REST API Example

This example shows how to implement a **REST API with TypeScript** using [Express.JS](https://expressjs.com/de/) and [Photon JS](https://photonjs.prisma.io/).
This example shows how to implement a **REST API with TypeScript** using [Express.JS](https://expressjs.com/de/) and [Photon.js](https://photonjs.prisma.io/).

__INLINE(../_setup-1.md)__
cd photonjs/examples/typescript/rest-express
Expand Down
2 changes: 1 addition & 1 deletion examples/.github/readmes/typescript/script/README.md
@@ -1,6 +1,6 @@
# Simple TypeScript Script Example

This example shows how to use [Photon JS](https://photonjs.prisma.io/) in a **simple TypeScript script** to read and write data in a database.
This example shows how to use [Photon.js](https://photonjs.prisma.io/) in a **simple TypeScript script** to read and write data in a database.

__INLINE(../_setup-1.md)__
cd photonjs/examples/typescript/script
Expand Down
4 changes: 2 additions & 2 deletions examples/javascript/cli-app/README.md
@@ -1,6 +1,6 @@
# Simple TODO-App Example (CLI)

This example shows how to implement a **TODO-app as a CLI tool** with Node.js and [Photon JS](https://photonjs.prisma.io/).
This example shows how to implement a **TODO-app as a CLI tool** with Node.js and [Photon.js](https://photonjs.prisma.io/).

## How to use

Expand Down Expand Up @@ -40,7 +40,7 @@ You can now use the [SQLite Browser](https://sqlitebrowser.org/) to view and edi

### 4. Generate Photon (type-safe database client)

Run the following command to generate [Photon JS](https://photonjs.prisma.io/):
Run the following command to generate [Photon.js](https://photonjs.prisma.io/):

```sh
prisma2 generate
Expand Down
4 changes: 2 additions & 2 deletions examples/javascript/graphql-auth/README.md
@@ -1,6 +1,6 @@
# GraphQL Server with Authentication & Permissions

This example shows how to implement a **GraphQL server with an email-password-based authentication workflow and authentication rules** based on [Photon JS](https://photonjs.prisma.io/), [graphql-yoga](https://github.com/prisma/graphql-yoga) & [graphql-shield](https://github.com/maticzav/graphql-shield).
This example shows how to implement a **GraphQL server with an email-password-based authentication workflow and authentication rules** based on [Photon.js](https://photonjs.prisma.io/), [graphql-yoga](https://github.com/prisma/graphql-yoga) & [graphql-shield](https://github.com/maticzav/graphql-shield).

## How to use

Expand Down Expand Up @@ -40,7 +40,7 @@ You can now use the [SQLite Browser](https://sqlitebrowser.org/) to view and edi

### 4. Generate Photon (type-safe database client)

Run the following command to generate [Photon JS](https://photonjs.prisma.io/):
Run the following command to generate [Photon.js](https://photonjs.prisma.io/):

```sh
prisma2 generate
Expand Down
2 changes: 1 addition & 1 deletion examples/javascript/graphql-subscriptions/README.md
Expand Up @@ -42,7 +42,7 @@ You can now use the [SQLite Browser](https://sqlitebrowser.org/) to view and edi

### 4. Generate Photon (type-safe database client)

Run the following command to generate [Photon JS](https://photonjs.prisma.io/):
Run the following command to generate [Photon.js](https://photonjs.prisma.io/):

```sh
prisma2 generate
Expand Down
4 changes: 2 additions & 2 deletions examples/javascript/graphql/README.md
@@ -1,6 +1,6 @@
# GraphQL Server Example

This example shows how to implement a **GraphQL server with JavaScript (Node.js)** based on [Photon JS](https://photonjs.prisma.io/) & [graphql-yoga](https://github.com/prisma/graphql-yoga).
This example shows how to implement a **GraphQL server with JavaScript (Node.js)** based on [Photon.js](https://photonjs.prisma.io/) & [graphql-yoga](https://github.com/prisma/graphql-yoga).

## How to use

Expand Down Expand Up @@ -40,7 +40,7 @@ You can now use the [SQLite Browser](https://sqlitebrowser.org/) to view and edi

### 4. Generate Photon (type-safe database client)

Run the following command to generate [Photon JS](https://photonjs.prisma.io/):
Run the following command to generate [Photon.js](https://photonjs.prisma.io/):

```sh
prisma2 generate
Expand Down
4 changes: 2 additions & 2 deletions examples/javascript/grpc/README.md
@@ -1,6 +1,6 @@
# gRPC Server Example

This example shows how to implement a **gRPC API with Node.js** and [Photon JS](https://photonjs.prisma.io/).
This example shows how to implement a **gRPC API with Node.js** and [Photon.js](https://photonjs.prisma.io/).

## How to use

Expand Down Expand Up @@ -40,7 +40,7 @@ You can now use the [SQLite Browser](https://sqlitebrowser.org/) to view and edi

### 4. Generate Photon (type-safe database client)

Run the following command to generate [Photon JS](https://photonjs.prisma.io/):
Run the following command to generate [Photon.js](https://photonjs.prisma.io/):

```sh
prisma2 generate
Expand Down
4 changes: 2 additions & 2 deletions examples/javascript/rest-express/README.md
@@ -1,6 +1,6 @@
# REST API Example

This example shows how to implement a **REST API** using [Express.JS](https://expressjs.com/de/) and [Photon JS](https://photonjs.prisma.io/).
This example shows how to implement a **REST API** using [Express.JS](https://expressjs.com/de/) and [Photon.js](https://photonjs.prisma.io/).

## How to use

Expand Down Expand Up @@ -40,7 +40,7 @@ You can now use the [SQLite Browser](https://sqlitebrowser.org/) to view and edi

### 4. Generate Photon (type-safe database client)

Run the following command to generate [Photon JS](https://photonjs.prisma.io/):
Run the following command to generate [Photon.js](https://photonjs.prisma.io/):

```sh
prisma2 generate
Expand Down
4 changes: 2 additions & 2 deletions examples/javascript/script/README.md
@@ -1,6 +1,6 @@
# Simple Node Script Example

This example shows how to use [Photon JS](https://photonjs.prisma.io/) in a **simple Node.js script** to read and write data in a database.
This example shows how to use [Photon.js](https://photonjs.prisma.io/) in a **simple Node.js script** to read and write data in a database.

## How to use

Expand Down Expand Up @@ -40,7 +40,7 @@ You can now use the [SQLite Browser](https://sqlitebrowser.org/) to view and edi

### 4. Generate Photon (type-safe database client)

Run the following command to generate [Photon JS](https://photonjs.prisma.io/):
Run the following command to generate [Photon.js](https://photonjs.prisma.io/):

```sh
prisma2 generate
Expand Down
4 changes: 2 additions & 2 deletions examples/typescript/cli-app/README.md
@@ -1,6 +1,6 @@
# Simple TODO-App Example (CLI)

This example shows how to implement a **TODO-app as a CLI tool** with TypeScript and [Photon JS](https://photonjs.prisma.io/).
This example shows how to implement a **TODO-app as a CLI tool** with TypeScript and [Photon.js](https://photonjs.prisma.io/).

## How to use

Expand Down Expand Up @@ -40,7 +40,7 @@ You can now use the [SQLite Browser](https://sqlitebrowser.org/) to view and edi

### 4. Generate Photon (type-safe database client)

Run the following command to generate [Photon JS](https://photonjs.prisma.io/):
Run the following command to generate [Photon.js](https://photonjs.prisma.io/):

```sh
prisma2 generate
Expand Down
4 changes: 2 additions & 2 deletions examples/typescript/graphql-apollo-server/README.md
@@ -1,6 +1,6 @@
# GraphQL Apollo Server Example

This example shows how to implement a **GraphQL server with TypeScript** based on [Photon JS](https://photonjs.prisma.io/), [apollo-server](https://www.apollographql.com/docs/apollo-server/) and [GraphQL Nexus](https://nexus.js.org/).
This example shows how to implement a **GraphQL server with TypeScript** based on [Photon.js](https://photonjs.prisma.io/), [apollo-server](https://www.apollographql.com/docs/apollo-server/) and [GraphQL Nexus](https://nexus.js.org/).

## How to use

Expand Down Expand Up @@ -40,7 +40,7 @@ You can now use the [SQLite Browser](https://sqlitebrowser.org/) to view and edi

### 4. Generate Photon (type-safe database client)

Run the following command to generate [Photon JS](https://photonjs.prisma.io/):
Run the following command to generate [Photon.js](https://photonjs.prisma.io/):

```sh
prisma2 generate
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/graphql-auth/README.md
Expand Up @@ -40,7 +40,7 @@ You can now use the [SQLite Browser](https://sqlitebrowser.org/) to view and edi

### 4. Generate Photon (type-safe database client)

Run the following command to generate [Photon JS](https://photonjs.prisma.io/):
Run the following command to generate [Photon.js](https://photonjs.prisma.io/):

```sh
prisma2 generate
Expand Down

0 comments on commit 6fa2497

Please sign in to comment.