Gathering detailed insights and metrics for express-sweet-generator
Gathering detailed insights and metrics for express-sweet-generator
Gathering detailed insights and metrics for express-sweet-generator
Gathering detailed insights and metrics for express-sweet-generator
npm install express-sweet-generator
Typescript
Module System
Node Version
NPM Version
JavaScript (91.78%)
CSS (7.99%)
Handlebars (0.22%)
EJS (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2 Stars
134 Commits
1 Forks
1 Watchers
1 Branches
2 Contributors
Updated on Feb 18, 2025
Latest Version
2.0.20
Package Id
express-sweet-generator@2.0.20
Unpacked Size
263.70 MB
Size
175.98 MB
File Count
6,737
NPM Version
10.9.0
Node Version
22.11.0
Published on
Feb 18, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
EXPRESS SWEET's application generator.
A comprehensive list of changes in each version may be found in the CHANGELOG.
1npm install -g express-sweet-generator
Use the application generator tool, express-sweet-generator
, to quickly create an application skeleton.
myapp
. The app will be created in a folder named myapp
in the current working directory.
1express-sweet -o esm myapp
1cd myapp/ 2npm install
1CREATE DATABASE IF NOT EXISTS `sample_db` DEFAULT CHARACTER SET utf8mb4;
2
3USE `sample_db`;
4
5CREATE TABLE `user` (
6 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
7 `name` varchar(30) NOT NULL,
8 `email` varchar(255) NOT NULL,
9 `password` varchar(100) NOT NULL,
10 `icon` varchar(768) NOT NULL DEFAULT MD5(RAND()),
11 `created` datetime NOT NULL DEFAULT current_timestamp(),
12 `modified` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
13 PRIMARY KEY (`id`),
14 UNIQUE KEY `ukUserEmail` (`email`),
15 UNIQUE KEY `ukUserIcon`(`icon`)
16) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
17
18CREATE TABLE `profile` (
19 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
20 `userId` int(10) unsigned NOT NULL,
21 `address` varchar(255) NOT NULL,
22 `tel` varchar(14) NOT NULL,
23 `created` datetime NOT NULL DEFAULT current_timestamp(),
24 `modified` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
25 PRIMARY KEY (`id`),
26 UNIQUE KEY `ukProfileUserId` (`userId`),
27 CONSTRAINT `fkProfileUser` FOREIGN KEY (`userId`) REFERENCES `user` (`id`)
28) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
29
30CREATE TABLE `comment` (
31 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
32 `userId` int(10) unsigned NOT NULL,
33 `text` text NOT NULL,
34 `created` datetime NOT NULL DEFAULT current_timestamp(),
35 `modified` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
36 PRIMARY KEY (`id`),
37 CONSTRAINT `fkCommentUser` FOREIGN KEY (`userId`) REFERENCES `user` (`id`)
38) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
39
40CREATE TABLE `book` (
41 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
42 `userId` int(10) unsigned NOT NULL,
43 `title` text NOT NULL,
44 `created` datetime NOT NULL DEFAULT current_timestamp(),
45 `modified` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
46 PRIMARY KEY (`id`),
47 UNIQUE KEY `ukBookTitle` (`userId`, `title`(255)),
48 CONSTRAINT `fkBookUser` FOREIGN KEY (`userId`) REFERENCES `user` (`id`)
49) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
50
51INSERT INTO `user` (`id`, `email`, `password`, `name`, `icon`) VALUES
52 (1, 'robin@example.com', 'password', 'Robin', '/upload/1.png'),
53 (2, 'taylor@example.com', 'password', 'Taylor', '/upload/2.png');
54INSERT INTO `profile` (`userId`, `address`, `tel`) VALUES
55 (1, '777 Brockton Avenue, Abington MA 2351', '202-555-0105'),
56 (2, '30 Memorial Drive, Avon MA 2322', '');
57INSERT INTO `comment` (`userId`, `text`) VALUES
58 (1, 'From Robin #1'),
59 (1, 'From Robin #2'),
60 (2, 'From Taylor #1');
61INSERT INTO `book` (`userId`, `title`) VALUES
62 (1, 'Beautiful'),
63 (1, 'Lose Yourself'),
64 (2, 'When Im Gone');
config/database.js
. For details, please refer to here.
1export default { 2 development: { 3 username: 'root', 4 password: 'password', 5 database: 'sample_db', 6 host: 'localhost', 7 dialect: 'mariadb' 8 }, 9 test: { 10 username: 'root', 11 password: 'password', 12 database: 'sample_db', 13 host: 'localhost', 14 dialect: 'mariadb' 15 }, 16 production: { 17 username: 'root', 18 password: 'password', 19 database: 'sample_db', 20 host: 'localhost', 21 dialect: 'mariadb' 22 } 23}
.env
file
1NODE_ENV=development
1npm start
http://localhost:3000/
in your browser to access the app.1. 2├── .env 3├── app.js 4├── ecosystem.config.js 5├── nginx.sample.conf 6├── package.json 7├── bin 8│ └── www 9├── client 10│ ├── package.json 11│ ├── webpack.config.js 12│ └── src 13├── config 14│ ├── authentication.js 15│ ├── config.js 16│ ├── database.js 17│ └── view.js 18├── errors 19│ └── NotFoundError.js 20├── middlewares 21│ └── checkValidationResult.js 22├── models 23│ ├── BookModel.js 24│ ├── CommentModel.js 25│ ├── ProfileModel.js 26│ └── UserModel.js 27├── public 28│ ├── build 29│ └── upload 30├── routes 31│ ├── login.js 32│ ├── profile.js 33│ ├── users.js 34│ └── api 35│ ├── profile.js 36│ └── users.js 37├── shared 38│ └── isEmpty.js 39├── validators 40│ └── isValidImageDataUrl.js 41└── views 42 ├── error.hbs 43 ├── login.hbs 44 ├── layout 45 │ └── default.hbs 46 ├── partials 47 │ └── .gitkeep 48 ├── users 49 │ └── index.hbs 50 ├── profile 51 │ ├── show.hbs 52 │ └── edit.hbs 53 └── errors 54 ├── 404.hbs 55 └── 500.hbs
Takuya Motoshima
No vulnerabilities found.
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
no SAST tool detected
Details
Reason
23 existing vulnerabilities detected
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More