Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres #39

Merged
merged 361 commits into from
Mar 1, 2019
Merged
Show file tree
Hide file tree
Changes from 85 commits
Commits
Show all changes
361 commits
Select commit Hold shift + click to select a range
4e1dfb4
Remove ormin, Add Gatabase
juancarlospaco Jan 27, 2019
ce221da
Remove ormin, Add Gatabase
juancarlospaco Jan 27, 2019
2e08ab4
Remove ormin, Add Gatabase
juancarlospaco Jan 27, 2019
289c177
Hype up readme
juancarlospaco Jan 27, 2019
2783b2e
Add Gatabase to server info
juancarlospaco Jan 27, 2019
2613bd2
typo
juancarlospaco Jan 27, 2019
06abbfb
typo
juancarlospaco Jan 27, 2019
51bbc71
Fix #43 , Implement HoneyPot for Security.
juancarlospaco Jan 27, 2019
0b3fbc5
Fix #43 , Implement HoneyPot for Security.
juancarlospaco Jan 27, 2019
d3f4490
Improve Server Info Page, usable on Demo.
juancarlospaco Jan 27, 2019
89a7692
Improve Server Info Page, usable on Demo.
juancarlospaco Jan 27, 2019
9efb33b
Improve Settings Page, usable on Demo.
juancarlospaco Jan 27, 2019
9c080a1
Improve Settings Page, usable on Demo.
juancarlospaco Jan 27, 2019
5fb36ee
Improve Settings Page, usable on Demo.
juancarlospaco Jan 27, 2019
e11c152
Improve Settings Page, usable on Demo.
juancarlospaco Jan 27, 2019
aa98be1
Improve Settings Page, usable on Demo.
juancarlospaco Jan 27, 2019
ee4cd4b
Improve Settings Page, usable on Demo.
juancarlospaco Jan 27, 2019
9f2aaba
Space out the Update Plugin button, HTML
juancarlospaco Jan 27, 2019
87c52ba
Update readme add link to devops folder
juancarlospaco Jan 27, 2019
c07143a
Improve Server info page.
juancarlospaco Jan 27, 2019
cbc6a7c
Improve Settigs page.
juancarlospaco Jan 27, 2019
ae05ddf
Improve Settigs page.
juancarlospaco Jan 27, 2019
6dc0037
Typo
juancarlospaco Jan 27, 2019
90254aa
Improve Server info page.
juancarlospaco Jan 27, 2019
1cd75bc
Improve Server info page.
juancarlospaco Jan 27, 2019
169956a
Add 2FA
juancarlospaco Jan 27, 2019
02e1151
Add 2FA
juancarlospaco Jan 27, 2019
4c69676
Add 2FA
juancarlospaco Jan 27, 2019
08bb62d
Add 2FA
juancarlospaco Jan 27, 2019
c965b1c
Add 2FA
juancarlospaco Jan 27, 2019
a840a10
Add 2FA
juancarlospaco Jan 27, 2019
ecee8f7
Add 2FA
juancarlospaco Jan 27, 2019
8b7b0fe
Add 2FA
juancarlospaco Jan 27, 2019
d304c66
Add 2FA
juancarlospaco Jan 27, 2019
21abd25
Add 2FA
juancarlospaco Jan 27, 2019
b5a83b6
Clean out code, simplify the starting random password, since they mus…
juancarlospaco Feb 1, 2019
048add2
Clean out code, simplify the starting random password, since they mus…
juancarlospaco Feb 1, 2019
4e1a99c
Clean out code, simplify the starting random password, since they mus…
juancarlospaco Feb 1, 2019
073f722
Implement new field on user table for 2FA Secret, use a random Secret…
juancarlospaco Feb 1, 2019
490d8cc
Implement new field on user table for 2FA Secret, use a random Secret…
juancarlospaco Feb 1, 2019
2f93d5e
Implement new field on user table for 2FA Secret, use a random Secret…
juancarlospaco Feb 1, 2019
44b43b0
Implement new field on user table for 2FA Secret, simplify naming
juancarlospaco Feb 1, 2019
01218fd
Implement new field on user table for 2FA Secret, simplify
juancarlospaco Feb 1, 2019
baec1db
2FA Secret must be Base32
juancarlospaco Feb 1, 2019
520f39a
2FA Secret must be Base32
juancarlospaco Feb 1, 2019
06faa64
2FA Secret must be Base32
juancarlospaco Feb 1, 2019
5c05c0f
2FA Secret must be Base32
juancarlospaco Feb 1, 2019
7837a9f
2FA Secret must be Base32
juancarlospaco Feb 1, 2019
56c0afd
Clean out
juancarlospaco Feb 1, 2019
7075737
Add TOS
juancarlospaco Feb 2, 2019
cd04891
Add TOS
juancarlospaco Feb 2, 2019
04f3506
Add TOS
juancarlospaco Feb 2, 2019
7b33f92
Add TOS
juancarlospaco Feb 2, 2019
d697197
Add TOS
juancarlospaco Feb 2, 2019
4b00194
Simplify
juancarlospaco Feb 2, 2019
9859b36
Add Bulma to Logs page
juancarlospaco Feb 3, 2019
48658ad
Add Bulma to Server Info page
juancarlospaco Feb 3, 2019
d031312
Add Bulma to Logs page
juancarlospaco Feb 3, 2019
6e8b97c
Add Firejails to improve security of NimWC
juancarlospaco Feb 3, 2019
911ba5f
Add Firejails to improve security of NimWC
juancarlospaco Feb 3, 2019
075c69f
Add Firejails to improve security of NimWC
juancarlospaco Feb 3, 2019
b6732ef
Add Firejails to improve security of NimWC
juancarlospaco Feb 3, 2019
d0a8a9d
Add Firejails to improve security of NimWC
juancarlospaco Feb 3, 2019
b5d83b8
Update Year to 2019 on credits, Add myself to Authors.
juancarlospaco Feb 3, 2019
4c9e6d6
Add more info to info page
juancarlospaco Feb 3, 2019
4e62333
Add better info, minor
juancarlospaco Feb 3, 2019
2456498
Clean out License duplicates, minor
juancarlospaco Feb 3, 2019
49e215f
Add Configuration Editable from Admin Dashboard directly from browser…
juancarlospaco Feb 3, 2019
669c983
Add Configuration Editable from Admin Dashboard directly from browser…
juancarlospaco Feb 3, 2019
26d1c06
Fix #45 ?, needs UI tho
juancarlospaco Feb 4, 2019
5010bbf
Add WebP for Images,optional,disable with -d:noWebp ,see https://cani…
juancarlospaco Feb 4, 2019
ea817b1
Add WebP for Images,optional,disable with -d:noWebp ,see https://cani…
juancarlospaco Feb 4, 2019
6cf3717
Add WebP for Images,optional,disable with -d:noWebp ,see https://cani…
juancarlospaco Feb 4, 2019
16a6b17
Add WebP for Images,optional,disable with -d:noWebp ,see https://cani…
juancarlospaco Feb 4, 2019
6535f60
Add WebP for Images,optional,disable with -d:noWebp ,see https://cani…
juancarlospaco Feb 4, 2019
b4fa808
Add firejail to config
juancarlospaco Feb 4, 2019
9a52ce9
Add firejail to config
juancarlospaco Feb 4, 2019
10ff496
Add firejail to config
juancarlospaco Feb 4, 2019
137350f
Firejail page Reads/Writes to/from config
juancarlospaco Feb 4, 2019
8fcc788
Firejail page Reads/Writes to/from config
juancarlospaco Feb 4, 2019
42553f5
Simplify Demo message on Setting page
juancarlospaco Feb 4, 2019
11a5593
CSS, minor
juancarlospaco Feb 4, 2019
2984f86
Firejail can be Optional,disable with -d:noFirejail
juancarlospaco Feb 4, 2019
067ca45
Firejail can be Optional,disable with -d:noFirejail
juancarlospaco Feb 4, 2019
b3fe73a
Firejail can be Optional,disable with -d:noFirejail
juancarlospaco Feb 4, 2019
874286a
Firejail can be Optional,disable with -d:noFirejail
juancarlospaco Feb 4, 2019
d60b6f1
Firejail can be Optional,disable with -d:noFirejail
juancarlospaco Feb 4, 2019
fb170dc
Implement all Feedbacks from Peer Review on Pull Request
juancarlospaco Feb 4, 2019
fea0322
Implement all Feedbacks from Peer Review on Pull Request
juancarlospaco Feb 4, 2019
3c13c55
Implement all Feedbacks from Peer Review on Pull Request
juancarlospaco Feb 4, 2019
36e7164
Implement all Feedbacks from Peer Review on Pull Request
juancarlospaco Feb 4, 2019
8701b92
Bump Version
juancarlospaco Feb 4, 2019
f37fe3e
Hype up Help message
juancarlospaco Feb 4, 2019
9bbcd94
log messages, minor
juancarlospaco Feb 4, 2019
039078d
Change some log messages to compile time, minor
juancarlospaco Feb 4, 2019
d661623
Change some log messages to compile time, minor
juancarlospaco Feb 4, 2019
eb82899
Firejail WIP
juancarlospaco Feb 5, 2019
5a6ef84
Nim 0.19.4
juancarlospaco Feb 5, 2019
5bce761
Nim 0.19.4
juancarlospaco Feb 5, 2019
b2a143b
Nim 0.19.4
juancarlospaco Feb 5, 2019
ff8df07
Firejail WIP clean out
juancarlospaco Feb 5, 2019
ef0010a
Firejail WIP Clean out
juancarlospaco Feb 5, 2019
103e611
Firejails Working
juancarlospaco Feb 6, 2019
57671c6
Firejail Working, update config for Firejail
juancarlospaco Feb 6, 2019
2b3b3ae
Code style
juancarlospaco Feb 6, 2019
4d97210
Add Unsplash for Design of the pages
juancarlospaco Feb 6, 2019
8ca6761
Add Unsplash for Design of the pages
juancarlospaco Feb 6, 2019
beb81da
Hype Up Plugins
juancarlospaco Feb 7, 2019
395a81e
Postgres & SQLite working Ok
juancarlospaco Feb 8, 2019
e3473b7
Postgres Working Ok
juancarlospaco Feb 8, 2019
27bc76b
Minor style
juancarlospaco Feb 8, 2019
7c22b55
Style, minor
juancarlospaco Feb 8, 2019
cf8a8e3
Style, simplify, minor
juancarlospaco Feb 8, 2019
efd3d65
Style, minor
juancarlospaco Feb 8, 2019
b87041a
Style, minor
juancarlospaco Feb 8, 2019
72741bb
Clean out, minor
juancarlospaco Feb 8, 2019
48cc0fc
Style, minor
juancarlospaco Feb 8, 2019
6914f71
Style, minor
juancarlospaco Feb 8, 2019
2a57b36
Style, minor
juancarlospaco Feb 8, 2019
2e332d4
Style, minor
juancarlospaco Feb 8, 2019
d9b25f2
Style, minor
juancarlospaco Feb 8, 2019
01c65fc
Style, minor
juancarlospaco Feb 8, 2019
b78d70d
Style, minor
juancarlospaco Feb 8, 2019
35d8d57
Style, minor
juancarlospaco Feb 8, 2019
543ee6b
Style, minor
juancarlospaco Feb 8, 2019
711af40
Update readme
juancarlospaco Feb 8, 2019
d263ea3
Hype up readme
juancarlospaco Feb 8, 2019
920caa3
Hype up Plugins
juancarlospaco Feb 8, 2019
eeef8fa
Add -d:release to list of compile flags passed on
juancarlospaco Feb 8, 2019
a43a4c0
cfg, minor
juancarlospaco Feb 9, 2019
d01bac4
Update Dockerfile and add Bash script too
juancarlospaco Feb 14, 2019
3f19499
Improve Dockerfile
juancarlospaco Feb 15, 2019
a263378
Improve dockerfile
juancarlospaco Feb 15, 2019
2e7b764
Improve Vagrantfile
juancarlospaco Feb 15, 2019
282070b
Removed icon - not showing in terminal
ThomasTJdev Feb 15, 2019
2b7ea51
Removed icon - not showing in terminal
ThomasTJdev Feb 15, 2019
67e9edd
Only check for 2fa if value exists in person.twofa
ThomasTJdev Feb 15, 2019
04d1bbf
Recompile failed during to fast loop check for filename. Use temp fil…
ThomasTJdev Feb 15, 2019
9f93463
CSS for unsplash settings
ThomasTJdev Feb 15, 2019
05d5d85
CSS for serverinfo page
ThomasTJdev Feb 15, 2019
2285c05
CSS for config page
ThomasTJdev Feb 15, 2019
b8dd70b
Redirect to / if firejail or unsplash is deactivated to avoid except …
ThomasTJdev Feb 15, 2019
46540a1
TOS url changed and CSS updated
ThomasTJdev Feb 15, 2019
26eca81
CSS for firejails settings
ThomasTJdev Feb 15, 2019
46b52b2
Moved log button to server section
ThomasTJdev Feb 15, 2019
65f4b59
Show filesize in kB or MB
ThomasTJdev Feb 15, 2019
a29d8ca
Remove icon not showing in terminal
ThomasTJdev Feb 15, 2019
cc717cb
Error files table sql
ThomasTJdev Feb 15, 2019
76c6ed6
Updated downloadCounter for files
ThomasTJdev Feb 15, 2019
9e11194
Use formatSize() instead of custom proc
ThomasTJdev Feb 15, 2019
b120459
Remove from files-table when deleting
ThomasTJdev Feb 15, 2019
a473cce
Disable firejail and unsplash as standard
ThomasTJdev Feb 15, 2019
4775034
Avoid exception when inserting empty or char into 2fa value and only …
ThomasTJdev Feb 15, 2019
c26a198
Make webp optional
ThomasTJdev Feb 16, 2019
ebdb25e
Fix #37. Removed summernote from CSS. Updated dependencies.
ThomasTJdev Feb 16, 2019
df18336
2FA option on user profile. User needs to enable
ThomasTJdev Feb 16, 2019
216b46c
Do not reveal if a user has OTP activated unless the username and pwd…
ThomasTJdev Feb 16, 2019
35a83ec
Do not reveal info about pwd length
ThomasTJdev Feb 16, 2019
641cd9d
Comment code
ThomasTJdev Feb 16, 2019
b0a2deb
Only use capital letter on types
ThomasTJdev Feb 16, 2019
05cd5e0
Remove link to FreeOTP
ThomasTJdev Feb 16, 2019
c5b20e6
Allow 2FA to varchar(60) in person table
ThomasTJdev Feb 16, 2019
6c5d76e
2FA column remove NOT NULL. 2FA is optional
ThomasTJdev Feb 16, 2019
c03f7ee
Updated changelog
ThomasTJdev Feb 16, 2019
f6e686d
Fix UI enable disable plugins
ThomasTJdev Feb 16, 2019
4e10f8c
Updated nimwc.service file to use nimble bin dir
ThomasTJdev Feb 16, 2019
65b9202
Updated readme. Inserted features in sections
ThomasTJdev Feb 16, 2019
3770a40
Changed no[text] compile options to [text] to avoid double negative. …
ThomasTJdev Feb 16, 2019
1dd676b
Add spacing
ThomasTJdev Feb 16, 2019
37b6223
Fix Typo, Minor
juancarlospaco Feb 20, 2019
e52a836
Fix Typos, Minor
juancarlospaco Feb 20, 2019
c7933f8
Add link to 2FA app on Docs
juancarlospaco Feb 20, 2019
b8f57ae
Delete nimwc2fa.nim after https://github.com/ThomasTJdev/nim_websitec…
juancarlospaco Feb 20, 2019
bdfd41d
Remove "WITHOUT OIDS" Postgres
juancarlospaco Feb 20, 2019
15c9b95
Bump Version to 5.0.0
juancarlospaco Feb 20, 2019
214c878
Minor
juancarlospaco Feb 20, 2019
8b9a3c1
Simplify wording, Minor
juancarlospaco Feb 21, 2019
2704289
Simplify wording, Minor
juancarlospaco Feb 21, 2019
5045be7
Simplify wording, remove unused "?", Minor
juancarlospaco Feb 21, 2019
5f79cf0
Fix wrong URL, Minor
juancarlospaco Feb 21, 2019
4c8a0a4
Typo
juancarlospaco Feb 21, 2019
9f91693
Show if User has 2FA on User list
juancarlospaco Feb 21, 2019
d56fcfb
Show 2FA only if Admin
juancarlospaco Feb 21, 2019
f3c513d
Add Last Modification to Files UI
juancarlospaco Feb 21, 2019
4dbf323
2FA improve, Minor
juancarlospaco Feb 21, 2019
cda772a
Simplify Salt on Test user
juancarlospaco Feb 22, 2019
5a7fb9c
Simplify Salt on Test user
juancarlospaco Feb 22, 2019
8b63ec6
Simplify Salt on Test user
juancarlospaco Feb 22, 2019
3e14890
Simplify info messages
juancarlospaco Feb 22, 2019
038adfc
Fix server info page
juancarlospaco Feb 22, 2019
56f08fd
Optimize server info page
juancarlospaco Feb 22, 2019
052c9d4
HTML, Minor
juancarlospaco Feb 22, 2019
a8d45bb
Clean out, Minor
juancarlospaco Feb 22, 2019
2511501
HTML, Minor
juancarlospaco Feb 22, 2019
963403e
Fix wrong staticExec
juancarlospaco Feb 22, 2019
ceebc33
Cleanout
juancarlospaco Feb 22, 2019
b541033
SQL Person table Mail must be Unique
juancarlospaco Feb 22, 2019
94b41ab
HTML, change input text to number for 2FA
juancarlospaco Feb 22, 2019
54c99e3
Cleanout, Minor
juancarlospaco Feb 22, 2019
c56c807
Simplify WEBP
juancarlospaco Feb 22, 2019
c9484bd
Add assert for missing EFS folders
juancarlospaco Feb 22, 2019
fb6d778
Increase WEBP Quality from 9 to 25
juancarlospaco Feb 22, 2019
f2cef4f
Improve Unsplash
juancarlospaco Feb 22, 2019
5dcf4a8
Improve wording, peer review feedback
juancarlospaco Feb 22, 2019
f370bee
Improve wording, peer review feedback
juancarlospaco Feb 22, 2019
ab6beee
HTML, Minor
juancarlospaco Feb 22, 2019
c22f9c5
Better wording, peer review feedback
juancarlospaco Feb 22, 2019
e39f4ba
Improve 2fa field on user list, peer review feedback
juancarlospaco Feb 22, 2019
d50dc90
Fix #52 , "See Templates" button cleanout
juancarlospaco Feb 22, 2019
4cd7bc1
Fix TOS
juancarlospaco Feb 22, 2019
634fd67
Hype up readme
juancarlospaco Feb 22, 2019
a1a4fa2
Clean out
juancarlospaco Feb 22, 2019
7cf5475
Rename TOS template to HTML
juancarlospaco Feb 22, 2019
bd5b2fe
Kill Gatabase
juancarlospaco Feb 27, 2019
a3e6c41
Remove Unsplash
juancarlospaco Feb 27, 2019
ded1f20
Clean out after ORM Removal
juancarlospaco Feb 27, 2019
db0bbca
Clean out after Gatabase removal
juancarlospaco Feb 27, 2019
242c23a
Clean out, minor
juancarlospaco Feb 27, 2019
91c8def
Style, minor
juancarlospaco Feb 27, 2019
a30b597
Style, minor
juancarlospaco Feb 27, 2019
826afa8
Add missing end when on a template
juancarlospaco Feb 28, 2019
b0d5a99
Firejail improve
juancarlospaco Feb 28, 2019
745a403
Update readme, minor
juancarlospaco Feb 28, 2019
2b5cf34
Clean out
juancarlospaco Feb 28, 2019
1ae0c8b
Improve Firejail
juancarlospaco Feb 28, 2019
4472dd4
Improve Firejail
juancarlospaco Feb 28, 2019
0df2993
CSS, minor
juancarlospaco Feb 28, 2019
5e9406a
Add Firejail to readme
juancarlospaco Mar 1, 2019
d2e2a41
Improve Firejail
juancarlospaco Mar 1, 2019
5d72b08
Improve Firejail
juancarlospaco Mar 1, 2019
b97e295
Improve Firejail
juancarlospaco Mar 1, 2019
fa55c56
Fix #54
juancarlospaco Mar 1, 2019
349d59d
Fix End of Line, Minor
juancarlospaco Mar 1, 2019
a6dff01
Add GitHub Issue & Pull Request Templates
juancarlospaco Mar 1, 2019
cebcbf0
Add desktop file, Minor
juancarlospaco Mar 1, 2019
d097a1f
Do not add public image to DB. Remove try-except
ThomasTJdev Mar 1, 2019
9d9ab93
Move public files above private files
ThomasTJdev Mar 1, 2019
7513308
Clean out default config
juancarlospaco Mar 1, 2019
2604864
Add number of blog views to the blog overview
ThomasTJdev Mar 1, 2019
27099ff
Merge branch 'postgres' of https://github.com/ThomasTJdev/nim_website…
ThomasTJdev Mar 1, 2019
79507b7
Add fake publication date for showing in blog oveview
ThomasTJdev Mar 1, 2019
b012c24
Fix #53
juancarlospaco Mar 1, 2019
0a5845c
Merge remote-tracking branch 'origin/postgres' into postgres
juancarlospaco Mar 1, 2019
4f23557
Make names with same style
ThomasTJdev Mar 1, 2019
6975f2d
Improve Blog date input from text to date
juancarlospaco Mar 1, 2019
3c502af
Improve error message addin admin #57
ThomasTJdev Mar 1, 2019
642e337
Blog Views, No Negative Views
juancarlospaco Mar 1, 2019
79f9958
Postgres increased id after each insertdata which messed up std data …
ThomasTJdev Mar 1, 2019
908033e
Merge branch 'postgres' of https://github.com/ThomasTJdev/nim_website…
ThomasTJdev Mar 1, 2019
b2f200c
Set SQLite as standard. Use defined(postgres) instead of sqlite
ThomasTJdev Mar 1, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 46 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,51 @@ A quick website tool. Run the nim file and access your webpage. Website: [https:
<img src="private/screenshots/NimWC_logo_shadow.png" style="max-height: 250px; display: block;" />


## Main features:

## Features

- High performance with low resources (Rasp Pi, netbook, VPS, cloud, old pc, etc).
- [Postgres](https://www.postgresql.org) or SQLite Database ORM with Raw Query performance.
- SQL Type-checked and Query-checked at compile-time, no SQL injections.
- Uses responsive [Bulma CSS framework](https://bulma.io), supports [Bootstrap CSS framework](https://getbootstrap.com).
- JavaScript framework agnostic, use Nim, [Karax](https://github.com/pragmagic/karax), vanilla JS, you choose.
- WYSIWYG & Drag'n'Drop Editors with [Summernote](https://summernote.org), [CodeMirror](https://codemirror.net) or [GrapesJS](https://grapesjs.com).
- Webserver hosting your page on 127.0.0.1:7000
- Edit your pages with Summernote, raw HTML (CodeMirror) or drag'n'drop with GrapesJS
- Blog - add and edit blog posts
- Pages - add and edit pages
- Custom head, navbar and footer
- Custom title, meta description and keywords for each page
- Edit core or custom js- and css-files
- Upload files (private or public)
- 1 Click Blogging posts directly from browser.
- 1 Click Static web pages directly from browser.
- Upload files and images (private or public) directly from browser.
- Plugin manager to install, enable and disable plugins directly from browser.
- Custom title, meta description and keywords for each page, SEO friendly.
- Custom head, navbar and footer, no hardcoded watermarks, links or logos.
- Edit core or custom JS and CSS directly from browser, UI/UX Designer friendly.
ThomasTJdev marked this conversation as resolved.
Show resolved Hide resolved
- Log Viewer directly from browser.
- Auto-Rotating file Logger.
- Uses responsive Bulma CSS framework, supports Bootstrap CSS framework.
- JavaScript framework agnostic, use Nim, Karax, vanilla JS, you choose.
- Server Info Page for Admins.
- Force Server restart for Admins.
- Reconfiguration & Recompilation without down times.
- Colored output on the Terminal.
- Plugin skeleton creator.
- Multiple users
- Add plugins
- Plugin skeleton creator to create your own new plugins.
- Plugins can do anything you want on Frontend and Backend.
- Multiple users with different ranks.
- 0 Dependency binary (Postgres required if using it, nothing required for SQLite).
- Runs on any non-Windows OS, Architecture and Hardware that can compile C code.
- High Availability design by default.
- BCrypt+Salt password hashing, 4 chars min for Demo, 10 chars min for Production.
- NGINX Config, SystemD Service, Vagrantfile and Dockerfile provided for DevOps.


## Requirements

- Linux
To get started you only need:

- Linux (For Windows see Docker-for-Windows)
- Nim >= `0.19.2`
- Nim modules (automated when using Nimble):
- jester >= `0.4.1`
- reCAPTCHA >= `1.0.2`
- bcrypt >= `0.2.1`

Dependencies (automatically installed by Nimble):

- Jester >= `0.4.1`
- ormin >= `0.1.0`
- reCAPTCHA >= `1.0.2`
- bCrypt >= `0.2.1`


# Compiling / Installing
Expand Down Expand Up @@ -215,11 +232,17 @@ sudo systemctl status nimwc
# GrapesJS
GrapesJS is a Web Builder Framework. To use GrapeJS with a CSS framework (Bulma or Bootstrap), you have to edit `public/js/grapejs_custom.js` and `public/js/grapejsbs4.min.js`. Bootstrap support in `public/js/grapejs_custom.js` is commented out.

# Trouble

Remove `nimcache` and `nimwcpkg/nimcache` and re-compile


# Docker

- [Use the Dockerfile](https://github.com/ThomasTJdev/nim_websitecreator/blob/master/Dockerfile) as starting point for your NimWC containers.


# Vagrant

- [Use the Vagrantfile](https://github.com/ThomasTJdev/nim_websitecreator/blob/master/Vagrantfile) as starting point for your NimWC VMs.


# SystemD

- [Use the SystemD Service file](https://github.com/ThomasTJdev/nim_websitecreator/blob/master/Vagrantfile) as starting point for your NimWC SystemD Services.
File renamed without changes.
100 changes: 100 additions & 0 deletions devops/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :


ENV["LC_ALL"] = "en_US.UTF-8" # This Locale will be shared on Host and Guest.

VAGRANTFILE_API_VERSION = "2" # Vagrantfile API/syntax version. Dont touch.


$script = <<-SCRIPT

echo Updating and Upgrading Pacman...
yes | pacman -Syuu --needed

echo Installing Postgres Database Server...
pacman -S --noconfirm --needed postgres curl

echo Installing Nim with ChooseNim...
export CHOOSENIM_NO_ANALYTICS=1
export PATH=$HOME/.nimble/bin:$PATH
echo "PATH=$HOME/.nimble/bin:$PATH" >> ~/.bashrc
echo "PATH=$HOME/.nimble/bin:$PATH" >> ~/.profile
curl https://nim-lang.org/choosenim/init.sh -sSfy | sh

echo Updating Nimble...
nimble -y refresh

echo Installing Nim Website Creator...
nimble -y install nimwc

echo Clean out...
yes | pacman -Scc
rm -rf /var/tmp/* /tmp/nimblecache/ /tmp/*

SCRIPT


Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

# Every Vagrant requires a box. See list http://vagrantbox.es
config.vm.box = "archlinux/archlinux"

# If true, then any SSH connections made will enable agent forwarding.
config.ssh.forward_agent = true

# Check for updates of the box on every boot.
config.vm.box_check_update = true

# Check SSL certificates of the server.
config.vm.box_download_insecure = true

# Checks all HTTP redirects, will be treated as trusted.
config.vm.box_download_location_trusted = true

# Time in seconds that Vagrant will wait for the machine to gracefully halt.
config.vm.graceful_halt_timeout = 5

# The hostname the virtual machine should have.
config.vm.hostname = "nim"

# Post boot up message.
config.vm.post_up_message = "Nim Website Creator Vagrant Box http://nimwc.org"

# Simple Bash Shell Provider, more than enough for Nim.
config.vm.provision "shell", inline: $script

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080

# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# config.vm.network :private_network, ip: "192.168.58.111"

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"

config.vm.provider :virtualbox do |vb|
# Boot with headless mode or not.
vb.gui = false

# Use VBoxManage to customize the VM. For example to change memory:
vb.customize [
'modifyvm', :id,
'--natdnshostresolver1', 'on',
'--memory', '1024',
'--cpus', '2'
]
end
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Template for nginx configuration sites-available/default
# Check if the config is valid using: nginx -t YourConfig.cfg

# To use SSL Let's Encrypt, install certbot and run:
# $sudo certbot --nginx -d webpage.com www.webpage.com
Expand All @@ -18,7 +19,7 @@ server {
location / {
root /home/user/nim/nimwc/public;

if ($request_uri ~* ".(ico|css|js|gif|jpe?g|png|svg)$") {
if ($request_uri ~* ".(ico|css|js|gif|jpeg|jpg|png|svg|bmp|webp)$") {
expires max;
access_log off;
add_header Pragma public;
Expand All @@ -36,4 +37,4 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}
23 changes: 23 additions & 0 deletions devops/nimwc.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[Unit]
Description=Nim Website Creator SystemD Service
Documentation=https://github.com/ThomasTJdev/nim_websitecreator#nim-website-creator
After=network-online.target # postgres.service

[Service]
Type=simple
User=nobody # Change to your user.
Restart=always # on-failure
RestartSec=1 # Sleep Seconds before restarting the process.
RuntimeMaxSec=1w # Restart process periodically. 1w=week, 1d=day, 1m=minute.
TimeoutStartSec=999 # Timeout Seconds while starting the process.
TimeoutStopSec=999 # Timeout Seconds while stopping the process.
# ExecStartPre= # Execute BEFORE start.
ExecStart=nimwc # Execute your nimwc command.
# ExecStartPost= # Execute AFTER start.
# ExecReload= # Execute while restarting the process.
# ExecStop= # Execute while stopping the process.
# ExecStopPost= # Execute AFTER stopping the process.
# Environment= # You can add any Environment variables here.

[Install]
WantedBy=multi-user.target
4 changes: 3 additions & 1 deletion nimwc.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author = "Thomas T. Jarløv (https://github.com/ThomasTJdev)"
description = "Generate and host a website. Run the package and access your new webpage."
license = "GPLv3"
bin = @["nimwc"]
skipDirs = @["private", "tmp"]
skipDirs = @["private", "tmp", "devops"]
installDirs = @["config", "nimwcpkg", "plugins", "public"]


Expand All @@ -14,6 +14,8 @@ requires "nim >= 0.19.2"
requires "jester >= 0.4.1"
requires "recaptcha >= 1.0.2"
requires "bcrypt >= 0.2.1"
requires "ormin >= 0.1.0"
requires "datetime2human >= 0.2.2"


import distros
Expand Down
Loading