https://github.com/codespede/pwoli-node-sample
A sample NodeJS app which uses Pwoli to show users how it works
https://github.com/codespede/pwoli-node-sample
Last synced: 5 months ago
JSON representation
A sample NodeJS app which uses Pwoli to show users how it works
- Host: GitHub
- URL: https://github.com/codespede/pwoli-node-sample
- Owner: codespede
- Created: 2021-11-08T20:31:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-18T09:51:31.000Z (6 months ago)
- Last Synced: 2025-01-18T10:28:59.065Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 248 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pwoli with Raw NodeJS Sample Application
A sample Express.js app which uses Pwoli to show users how it works
## Try it out
Easiest way is to clone this repo into your local:
```
git clone https://github.com/internetmango/pwoli-node-sample.git
# cd into the directory
npm install
```- Provide your DB credentials in the file config/config.json
- Initialize the DB with tables
```
node --experimental-json-modules dbinit.js
```
- For adding some seed data(dummy data) to the tables, please run:```
sequelize db:seed:all
```
- Run the app
```
node --experimental-json-modules index.js
```Point your browser to http://localhost:3500/items/list and you should see a page with a `GridView` where you can do CRUD operations for the items.
Point your browser to http://localhost:3500/items/api to see the RESTful API features mentioned in https://internetmango.github.io/pwoli/rest-api
## Using Mongoose as ORM
For using Mongoose as the ORM, please follow the below steps:
- Rename the file `orm-model-config-sample.cjs` to `orm-model-config.cjs` in your working directory.
- Run the app
```
node --experimental-json-modules index-mongo.js
```
- Then point your browser to the above URLs.