BucketServer - Small API with SQLite database that saves notes for an iOS appliction called Bucket list

Overview

BucketList Server-Side

Small API with SQLite database that saves notes for an iOS appliction called Bucket list. This project is done using Vapor 4, and has all CRUD operations implemented using the /tasks and /tasks/ endpoints.

Endpoints

Creating a task

POST "(localhost)/tasks"
Header "Content-Type: application/json"
Body:

{"objective": "My first tasks"} \

Reading all tasks

GET "(localhost)/tasks"
Header "Content-Type: application/json" \

Updating a tasks

PUT "(localhost)/tasks/(id)"
Header "Content-Type: application/json"
Body:

{"objective": "Writing to vapor and updated objective here "} \

Delete a tasks

DELETE "(localhost)/tasks/(id)"
Header "Content-Type: application/json" \

Running project

First install home brew: https://brew.sh

Then open terminal and run

Commands

brew install vapor
vapor

When you run vapor and see a list of commands then you have successfully install vapor

Now clone or download the repo to your desktop using GitHub desktop or whatever you prefer https://github.com/rodleyva/BucketServer/tree/master

Next we’ll cd and build our project It’s important the project is in your desktop or the next commands won’t work

Commands

cd ~/Desktop/(name of the project folder)
vapor build
vapor xcode

Then just run the project on Xcode and you will get a local server usually like http://127.0.0.1:8080

Errors

If you get a "vapor: Address already in use" error just do this in terminal

sudo lsof -i :8080
kill {PID of the process}

Then run the project again

reference: https://stackoverflow.com/questions/53298296/vapor-address-already-in-use-errno-98

You might also like...
This Project domonstrate the latest Swift on Server to create RESTFul API's connected via Database: MongoDB NoSql

Swift is a general-purpose programming language built using a modern approach to safety & performance that make it specifically suitable for Server applications. Vapor is a web framework for Swift, allowing you to write backends, web apps APIs and HTTP servers in Swift

Listens to changes in a PostgreSQL Database and via websockets.

realtime-swift Listens to changes in a PostgreSQL Database and via websockets. A Swift client for Supabase Realtime server. Usage Creating a Socket co

WCDB is a cross-platform database framework developed by WeChat.
WCDB is a cross-platform database framework developed by WeChat.

WCDB 中文版本请参看这里 WCDB is an efficient, complete, easy-to-use mobile database framework used in the WeChat application. It's currently available on iOS,

Sync Realm Database with CloudKit
Sync Realm Database with CloudKit

IceCream helps you sync Realm Database with CloudKit. It works like magic! Features Realm Database Off-line First Thread Safety Reactive Programming O

Movies Information DataBase (Add - Delete - Edit - Search)

MoviesInformation Movies Information DataBase (Add - Delete - Edit - Search) This Code Provide Simple Program About Movies Information This Program Ca

Safe and easy wrappers for common Firebase Realtime Database functions.

FirebaseHelper FirebaseHelper is a small wrapper over Firebase's realtime database, providing streamlined methods for get, set, delete, and increment

A Generic CoreData Manager to accept any type of objects. Fastest way for adding a Database to your project.
A Generic CoreData Manager to accept any type of objects. Fastest way for adding a Database to your project.

QuickDB FileManager + CoreData ❗️ Save and Retrieve any thing in JUST ONE line of code ❗️ Fast usage dataBase to avoid struggling with dataBase comple

Easy direct access to your database 🎯

OHMySQL ★★ Every star is appreciated! ★★ The library supports Objective-C and Swift, iOS and macOS. You can connect to your remote MySQL database usin

Owner
null
SQLite.swift - A type-safe, Swift-language layer over SQLite3.

SQLite.swift provides compile-time confidence in SQL statement syntax and intent.

Stephen Celis 8.6k Nov 20, 2022
A toolkit for SQLite databases, with a focus on application development

A toolkit for SQLite databases, with a focus on application development

Gwendal Roué 5.5k Nov 25, 2022
YapDB is a collection/key/value store with a plugin architecture. It's built atop sqlite, for Swift & objective-c developers.

YapDatabase is a collection/key/value store and so much more. It's built atop sqlite, for Swift & Objective-C developers, targeting macOS, iOS, tvOS &

Yap Studios 3.3k Nov 17, 2022
A Cocoa / Objective-C wrapper around SQLite

FMDB v2.7 This is an Objective-C wrapper around SQLite. The FMDB Mailing List: https://groups.google.com/group/fmdb Read the SQLite FAQ: https://www.s

August 13.7k Nov 16, 2022
Implement Student Admission System using SQlite

StudentAdmissionSQLiteApp Implement Student Admission System using SQlite. #Func

Hardik 2 Apr 27, 2022
macOS Sqlite tableView 샘플 - objective c

목적 Objective C언어를 이용하여 macOS를 개발해본다. Sqlite를 이용하여 데이터를 저장하고, 불러와본다. FMDB를 이용한다. 데이터를 NSTableView를 이용하여 불러와본다. 추가적으로 NSOutlineView 구현해본다. 추가적으로 KVOCont

HyunSu Park 0 Jan 10, 2022
A Swift wrapper for SQLite databases

Squeal, a Swift interface to SQLite Squeal provides access to SQLite databases in Swift. Its goal is to provide a simple and straight-forward base API

Christian Niles 297 Aug 6, 2022
A stand-alone Swift wrapper around the SQLite 3 client library.

Perfect - SQLite Connector This project provides a Swift wrapper around the SQLite 3 library. This package builds with Swift Package Manager and is pa

PerfectlySoft Inc. 47 Nov 19, 2022
MagicData - A replacement of SQlite, CoreData or Realm.

MagicData A replacement of SQlite, CoreData or Realm. It is very easy to use and is a light version. Guides MagicData We use MagicData manage all the

Underthestars-zhy 20 Jul 4, 2022
Swift APIs for SQLite: Type-safe down to the schema. Very, very, fast. Dependency free.

Lighter Lighter is a set of technologies applying code generation to access SQLite3 databases from Swift, e.g. in iOS applications or on the server. L

Lighter.swift 313 Nov 15, 2022