A CLI tool to create a full mock REST API with zero coding
To install Swiftsonver, run the following commands:
cd ~/Downloads
wget https://github.com/YassineLafryhi/Swiftsonver/releases/download/0.9.0/Swiftsonver.zip
unzip Swiftsonver.zip
sudo mkdir -p /usr/local/bin
sudo mv swiftsonver /usr/local/bin/swiftsonver
sudo chmod +x /usr/local/bin/swiftsonver
Start by running swiftsonver init
file inside your project directory, then edit the swiftsonver.yml file :
apiVersion: "v1"
jsonDatabaseName: "database.json"
publicFolderName: "public"
uploadsFolderName: "uploads"
requiresAuthorization: true
jwtSecret: "MY_JWT_SECRET"
jwtExpirationTime: 300 # 5 minutes
adminUsername: "admin"
adminPassword: "password"
resources:
- name: "posts"
- name: "comments"
After editing the swiftsonver.yml file, run the following command to start the server:
swiftsonver serve
To build Swiftsonver from source, run the following commands:
git clone https://github.com/YassineLafryhi/Swiftsonver.git
cd Swiftsonver
chmod +x build.sh
./build.sh
# Then you can move swiftsonver to /usr/local/bin/swiftsonver
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request