Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
swish/run.pl at master · ridgeworks/swish · GitHub
Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
ridgeworks
swish
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
swish
/
run.pl
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
77 lines (62 loc) · 2.85 KB
master
Breadcrumbs
swish
/
run.pl
Copy path
Top
File metadata and controls
Code
Blame
77 lines (62 loc) · 2.85 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
Part of SWISH
Author: Jan Wielemaker
E-mail: J.Wielemaker@cs.vu.nl
WWW: http://www.swi-prolog.org
Copyright (C): 2014-2017, VU University Amsterdam
CWI Amsterdam
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
:-
use_module
(library(
main
))
.
:-
use_module
(library(
option
))
.
:-
use_module
(
server
)
.
/*
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Usage:
swipl run.pl [--public] [--port=Port]
Simple start script for running SWISH in an interactive Prolog session.
This version is intended for development and testing purposes. Checkout
daemon.pl if to deploy SWISH as a server. Options:
* --port=Port
Bind to a the specified port instead of the default 3050.
* --public
Listen on all networks. By default SWISH only listens on
`localhost`. Only use this in a *trusted network environent*,
e.g., behind a firewall.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
:- initialization(
run_swish
,
main
)
.
run_swish
:-
set_prolog_flag(
toplevel_goal
,
prolog
),
% run interactively
current_prolog_flag(
argv
,
Argv
),
argv_options(
Argv
,
_
,
Options
),
option(port(
Port
),
Options
,
3050
),
( option(public(
true
),
Options
)
->
Address
=
Port
;
Address
=
localhost
:
Port
),
server(
Address
)
.
opt_type
(
port
,
port
,
natural
)
.
opt_type
(
p
,
port
,
natural
)
.
opt_type
(
public
,
public
,
boolean
)
.
opt_help
(
port
,
"TCP/IP port to bind to"
)
.
opt_help
(
public
,
"Connect to all interfaces instead of only to localhost"
)
.
opt_meta
(
port
,
'PORT'
)
.
You can’t perform that action at this time.