Skip to content

Commit

Permalink
fix: update README.md to fit nextjs dev and production (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanggggjie authored Feb 25, 2024
1 parent ee23f73 commit 674ac76
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Casbin-editor

Casbin-editor is a web-based Casbin model and policy editor. It's based on React + TypeScript.
Casbin-editor is a web-based Casbin model and policy editor. It's based on Next.js + TypeScript.

Use the Casbin-editor to write your Casbin model and policy in your web browser.
It provides functionality such as syntax highlighting and code completion, just like an IDE for a programming language.
Expand All @@ -16,19 +16,23 @@ Casbin-editor is a pure frontend Javascript project. It uses [node-casbin](https

This project can be viewed as an example for using node-casbin in the browser.

## Getting started
## For Dev

```shell
npm install
npm start
yarn install
yarn dev
```

Open browser: http://localhost:3000/

## Deployment
## Production Preview

```
npm deploy

```shell
yarn build

# Make sure port 3000 is not in use
yarn start
```

The generated static pages will be pushed into `gh-pages` branch of `origin` and published in GitHub Pages (https://editor.casbin.org). The Casbin official site (https://casbin.org/editor) uses iframe to embed the published GitHub pages.
Open browser: http://localhost:3000/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"start": "npx serve@latest out",
"lint": "next lint"
},
"dependencies": {
Expand Down

0 comments on commit 674ac76

Please sign in to comment.