Serverpod is a next-generation app and web server, explicitly built for the Flutter and Dart ecosystem.

Related tags

Desktop serverpod
Overview

Serverpod

Serverpod is a next-generation app and web server, explicitly built for the Flutter and Dart ecosystem. It allows you to write your server-side code in Dart, automatically generate your APIs, and hook up your database with minimal effort. Serverpod is open-source, and you can host your server anywhere.

Please note that Serverpod is still in early-stage development, and things may frequently change over the next few months.

Every design decision made in Serverpod aims to minimize the amount of code that needs to be written and make it as readable as possible. Apart from being just a server, Serverpod incorporates many common tasks that are otherwise cumbersome to implement or require external services.

  • Serverpod will automatically generate the protocol and client-side code by analyzing your server. Calling a remote endpoint is as easy as making a local method call — no more deciphering and parsing REST API responses.
  • Connecting the database has never been easier. Database rows are represented by typed Dart classes and can even be serialized and sent directly to the client.
  • Need to perform a task at a specific time in the future? Serverpod supports future calls that are persistent even if you need to restart the server.
  • Caching and scaling are made simple. Commonly requested objects can be cached locally on a single server or distributed over a cluster of servers.

Installing Serverpod

Serverpod is tested on Mac and Linux but may work on other platforms too. Before you can install Serverpod, you need to the following tools installed:

  • Flutter and Dart. Serverpod is technically only using Dart, but most use cases include writing a client in Flutter. You will need Dart version 2.12 or later. https://flutter.dev/docs/get-started/install
  • Postgresql. Using a Postgresql database with Serverpod is not optional as many of the core features need the database to operate. Postgresql version 13 is recommended. https://www.postgresql.org/download/

Once you have Dart installed and configured, open up a terminal and install Serverpod by running:

dart pub global activate serverpod_cli

Now test the install by running:

serverpod

If everything is correctly configured, the help for the serverpod command is now displayed.

Creating your first project

To get your local server up and running, you need to create a new Serverpod project and configure the database. Create a new project by running serverpod create.

serverpod create mypod

This command will create a new directory called mypod, with two dart packages inside; mypod_server and mypod_client.

  • mypod_server: This package contains your server-side code. Modify it to add new endpoints or other features your server needs.
  • mypod_client: This is the code needed to communicate with the server. Typically, all code in this package is generated automatically, and you should not edit the files in this package.

Connect the database

Now that the project has been created, you need to hook it up with the database. Open the mypod_server package in your favorite IDE. Edit the config/development.yaml file and replace DATABASE_NAME and DATABASE_USER with the database name and the user name required to connect to the database. You most likely set this up when you installed your Postgresql database. Open config/passwords.yaml and replace the DATABASE_PASSWORD with the password for the database.

Create the default set of tables

Finally, you need to populate the database with some tables that Serverpod uses internally. To do this, connect to your database and run the queries found here.

Start the server

Now you should be all set to run your server. Start it by changing into the mypod_server directory and type:

dart pub get
dart bin/main.dart

If everything is working you should see something like this on your terminal:

Mode: development
Config loaded from: config/development.yaml
port: 8080
database host: localhost
database port: 5432
database name: mydatabase
database user: myusername
database pass: ********
Insights listening on port 8081
Server id 0 listening on port 8080

Working with endpoints

Endpoints are the connection points to the server from the client. With Serverpod, you add methods to your endpoint, and your client code will be generated to make the method call. For the code to be generated, you need to place your endpoint in the endpoints directory of your server. Your endpoint should extend the Endpoint class. For methods to be generated, they need to return a typed Future, and its first argument should be a Session object. The Session object holds information about the call being made to the server and provides access to the database.

import 'package:serverpod/serverpod.dart';

class ExampleEndpoint extends Endpoint {
  Future
   
     hello(Session session, String name) async {
    return 'Hello $name';
  }
}

   

The above code will create an endpoint called example (the Endpoint suffix will be removed) with the single hello method. To generate the serverside code run serverpod generate in the home directory of the server.

On the client side, you can now call the method by calling:

var result = await client.example.hello('World');

Passing parameters

There are some limitations to how endpoint methods can be implemented. Currently named parameters are not yet supported. Parameters and return types can be of type bool, int, double, String, DateTime, or generated serializable objects (see next section). A typed Future should always be returned. Null safety is supported. When passing a DateTime it is always converted to UTC.

Generating serializable classes

Serverpod makes it easy to generate serializable classes that can be passed between server and client or used to connect with the database. The structure for the classes is defined in yaml-files in the protocol directory. Run serverpod generate to build the Dart code for the classes and make them accessible to both the server and client.

Here is a simple example of a yaml-file defining a serializable class:

class: Company
fields:
  name: String
  foundedDate: DateTime?
  employees: List
   

   

Supported types are bool, int, double, String, DateTime, and other serializable classes. You can also use lists of objects. Null safety is supported. Once your classes are generated, you can use them as parameters or return types to endpoint methods.

Database mappings

It's possible to map serializable classes straight to tables in your database. To do this, add the table key to your yaml file:

class: Company
table: company
  name: String
  foundedDate: DateTime?
  employees: List
   

   

When running serverpod generate, the database schema will be saved in the generated/tables.pgsql file. You can use this to create the corresponding database tables.

In some cases, you want to save a field to the database, but it should never be sent to the server. You can exclude it from the protocol by adding the database flag to the type.

class: UserData
fields:
  name: String
  password: String, database

Likewise, if you only want a field to be accessible in the protocol but not stored in the server, you can add the api flag. By default, a field is accessible to both the API and the database.

Database indexes

For performance reasons, you may want to add indexes to your database tables. You add these in the yaml-files defining the serializable objects.

class: Company
table: company
  name: String
  foundedDate: DateTime?
  employees: List
   
    
indexes:
  company_name_idx:
    fields: name

   

The fields key holds a comma-separated list of column names. In addition, it's possible to add a type key (default is btree), and a unique key (default is false).

Communicating with the database

Note that the Serverpod ORM is still under heavy development, and the APIs may change.

Serverpod makes it easy to communicate with your database using strictly typed objects without a single SQL line. But, if you need to do more complex tasks, you can always do direct SQL calls.

For the communication to work, you need to have generated serializable classes with the table key set, and the corresponding table must have been created in the database.

Inserting a table row

Insert a new row in the database by calling the insert method of the db field in your Session object.

var myRow = Company(name: 'Serverpod corp.', employees: []);
await session.db.insert(myRow);

After the object has been inserted, it's id field is set from its row in the database.

Finding a single row

You can find a single row, either by its id or using an expression. You need to pass a reference to the table description in the call. Table descriptions are accessible through global variables with the object's class name preceded by a t.

var myCompany = await session.db.findById(tCompany, companyId) as Company?;

If no matching row is found, null is returned. You can also search for rows using expressions with the where parameter.

var myCompany = await session.db.findSingleRow(
  tCompany,
  where: tCompany.name.equals('My Company'),
);

Finding multiple rows

To find multiple rows, use the same principle as for finding a single row. Returned will be a List of TableRows. Iterate over the list to access the indivitual rows.

var rows = await session.db.find(
  tCompany,
  where: tCompany.id < 100,
  limit 50,
);
var companies = rows.cast
   
    ();

   

Updating a row

To update a row, use the update method. The object that you update must have its id set to a non null value.

var myCompany = await session.db.findById(tCompany, companyId) as Company?;
myCompany.name = 'New name';
await session.db.update(myCompany);

Deleting rows

Deleting a single row works similarly to the update method, but you can also delete rows using the where parameter.

// Delete a single row
await session.db.deleteRow(myCompany);

// Delete all rows where the company name ends with 'Ltd'
await session.db.delete(
  where: tCompany.name.like('%Ltd'),
);

Creating expressions

To find or delete specific rows, most often, expressions are needed. Serverpod makes it easy to build expressions that are statically type-checked. Columns are referenced using the global Table objects. The table objects are named the same as the generated object classes but prefixed with a t. The >, >=, <, <=, &, and | operators are overridden to make it easier to work with column values. When using the operators, it's good practice to place them within a set of parentheses as the precedence rules are not always what would be expected. These are some examples of expressions.

// The name column of the Company table equals 'My company')
tCompany.name.equals('My company')

// Companies founded at or after 2020
tCompany.foundedDate >= DateTime.utc(2020)

// Companies with number of employees between 10 and 100
(tCompany.numEmployees > 10) & (tCompany.numEmployees <= 100)

// Companies that has the founded date set
tCompany.foundedDate.notEquals(null)

Transactions and joins

Transactions and joins are still under development.

Executing raw queries

Sometimes more advanced tasks need to be performed on the database. For those occasions, it's possible to run raw SQL queries on the database. Use the query method. A List > will be returned with rows and columns.

var result = await session.db.query('SELECT * FROM mytable WHERE ...');

Caching

Accessing the database can sometimes be expensive for complex database queries or if you need to run many different queries for a specific task. Serverpod makes it easy to cache frequently requested objects in RAM. Any serializable object can be cached. If your Serverpod is hosted across multiple servers in a cluster, objects can be stored in the distributed cache. When reading from the distributed cache, Serverpod will automatically figure out where it is stored. This is useful for objects that need to remain the same across servers but still can be cached.

Caches can be accessed through the Session object. This is an example of an endpoint method for requesting data about a user:

Future
   
     getUserData(Session session, int userId) async {
  // Define a unique key for the UserData object
  var cacheKey = 'UserData-$userId';

  // Try to retrieve the object from the cache
  var userData = await session.caches.local.get(cacheKey) as UserData?;

  // If the object wasn't found in the cache, load it from the database and
  // save it in the cache. Make it valid for 5 minutes.
  if (userData == null) {
    userData = session.db.findById(tUserData, userId) as UserData?;
    await session.caches.local.put(cacheKey, userData!, lifetime: Duration(minutes: 5));
  }

  // Return the user data to the client
  return userData;
}

   

In total, there are four caches where you can store your objects. Two caches are local to the server handling the current session, and two are distributed across the server cluster. There are two variants for the local and distributed cache, one regular cache, and a priority cache. Place objects that are frequently accessed in the priority cache.

Logging

Serverpod uses the database for storing logs; this makes it easy to search for errors, slow queries, or debug messages. To log custom messages during the execution of a session, use the log method of the session object. When the session is closed, either from successful execution or by failing from throwing an exception, the messages are written to the log. By default, session log entries are written for every completed session.

session.log('This is working well');

Log entries are stored in the following tables of the database: serverpod_log for text messages, serverpod_query_log for queries, and serverpod_session_log for completed sessions. Optionally, it's possible to pass a log level with the message to filter out messages depending on the server's runtime settings.

Configuration files and deployment

Serverpod has three main configuration files, depending on which mode the server is running; development, staging, or production. The files are located in theconfig/ directory. By default, the server will start in development mode. To use another configuration file, use the --mode option when starting the server. If you are running multiple servers in a cluster, use the --server-id option to specify the id of each server. By default, the server will run as id 0. For instance, to start the server in production mode with id 2, run the following command:

dart bin/main.dart --mode production --server-id 2

Depending on how memory intensive the server is and how many requests it is serving at peak times, you may want to increase the maximum heap size Dart can use. You can do this by passing the --old_gen_heap_size option to dart. If you set it to 0 it will give Dart unlimited heap space. Serverpod will run on most operating systems where you can run Dart; Flutter is not required.

Running a cluster of servers

To improve scalability and reliability it's possible to run Serverpod over a cluster of servers. The ids of the servers should be in a consecutive sequence from 0 to n-1 where n is the number of servers in your cluster. You can set this up in the production.yaml configuration file.

To run a cluster of servers, you need to place your servers behind a load balancer so that they have a common access point to the main API port. If you want to gather runtime information from the servers, the service port needs to be accessible not only between servers in the cluster but also from the outside. By default, communication with the service API is encrypted, while you most likely want to add an HTTPS certificate to your load balancer to make sure all communication with clients is encrypted.

Signing in with Google and Apple

Serverpod supports signing in with Google and Apple through the auth module. For more information on setting up authentication, check out the auth documentation.

Comments
  • Failed to generate server side code on windows 10

    Failed to generate server side code on windows 10

    Describe the bug: Failed to generate server side code after running the command

    serverpod generate
    
    Generating classes
    Generating server side code.
    Failed to generate lib/src/protocol\company.yaml
    FileSystemException: Cannot create file, path = 'lib/src/generated/protocol\company.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    Failed to generate lib/src/protocol\employee.yaml
    FileSystemException: Cannot create file, path = 'lib/src/generated/protocol\employee.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    Failed to generate lib/src/protocol\example_class.yaml
    FileSystemException: Cannot create file, path = 'lib/src/generated/protocol\example_class.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    Generating Dart client side code.
    Failed to generate lib/src/protocol\company.yaml
    FileSystemException: Cannot create file, path = '../mypod_client/lib/src/protocol/protocol\company.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    Failed to generate lib/src/protocol\employee.yaml
    FileSystemException: Cannot create file, path = '../mypod_client/lib/src/protocol/protocol\employee.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    Failed to generate lib/src/protocol\example_class.yaml
    FileSystemException: Cannot create file, path = '../mypod_client/lib/src/protocol/protocol\example_class.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    Done.
    Generating protocol
    Unhandled exception:
    Invalid argument(s): Only absolute normalized paths are supported: C:\Users\abdullah\dart_backend\mypod\mypod_server\lib/src/endpoints
    #0      AnalysisContextCollectionImpl._throwIfNotAbsoluteNormalizedPath (package:analyzer/src/dart/analysis/analysis_context_collection.dart:104:7)
    #1      AnalysisContextCollectionImpl._throwIfAnyNotAbsoluteNormalizedPath (package:analyzer/src/dart/analysis/analysis_context_collection.dart:95:7)
    #2      new AnalysisContextCollectionImpl (package:analyzer/src/dart/analysis/analysis_context_collection.dart:47:5)
    #3      new ProtocolAnalyzer (file:///C:/Users/abdullah/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.8.10/bin/generator/protocol_analyzer.dart:23:18)
    #4      performAnalysis (file:///C:/Users/abdullah/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.8.10/bin/generator/protocol_analyzer.dart:14:31)
    #5      performGenerateProtocol (file:///C:/Users/abdullah/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.8.10/bin/generator/protocol_generator.dart:14:26)
    #6      performGenerate (file:///C:/Users/abdullah/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.8.10/bin/generator/generator.dart:13:3)
    #7      main (file:///C:/Users/abdullah/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.8.10/bin/serverpod_cli.dart:136:7)
    #8      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
    #9      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
    Generating classes
    Generating server side code.
    Failed to generate lib/src/protocol\company.yaml
    FileSystemException: Cannot create file, path = 'lib/src/generated/protocol\company.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    Failed to generate lib/src/protocol\employee.yaml
    FileSystemException: Cannot create file, path = 'lib/src/generated/protocol\employee.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    Failed to generate lib/src/protocol\example_class.yaml
    FileSystemException: Cannot create file, path = 'lib/src/generated/protocol\example_class.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    Generating Dart client side code.
    Failed to generate lib/src/protocol\company.yaml
    FileSystemException: Cannot create file, path = '../mypod_client/lib/src/protocol/protocol\company.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    Failed to generate lib/src/protocol\employee.yaml
    FileSystemException: Cannot create file, path = '../mypod_client/lib/src/protocol/protocol\employee.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    Failed to generate lib/src/protocol\example_class.yaml
    FileSystemException: Cannot create file, path = '../mypod_client/lib/src/protocol/protocol\example_class.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    Done.
    Generating protocol
    Unhandled exception:
    Invalid argument(s): Only absolute normalized paths are supported: C:\Users\abdullah\dart_backend\mypod\mypod_server\lib/src/endpoints
    #0      AnalysisContextCollectionImpl._throwIfNotAbsoluteNormalizedPath (package:analyzer/src/dart/analysis/analysis_context_collection.dart:104:7)
    #1      AnalysisContextCollectionImpl._throwIfAnyNotAbsoluteNormalizedPath (package:analyzer/src/dart/analysis/analysis_context_collection.dart:95:7)
    #2      new AnalysisContextCollectionImpl (package:analyzer/src/dart/analysis/analysis_context_collection.dart:47:5)
    #3      new ProtocolAnalyzer (file:///C:/Users/abdullah/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.8.10/bin/generator/protocol_analyzer.dart:23:18)
    #4      performAnalysis (file:///C:/Users/abdullah/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.8.10/bin/generator/protocol_analyzer.dart:14:31)
    #5      performGenerateProtocol (file:///C:/Users/abdullah/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.8.10/bin/generator/protocol_generator.dart:14:26)
    #6      performGenerate (file:///C:/Users/abdullah/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.8.10/bin/generator/generator.dart:13:3)
    #7      main (file:///C:/Users/abdullah/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.8.10/bin/serverpod_cli.dart:136:7)
    #8      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
    #9      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
    

    Reproduce code:

    protocol/employee.yaml

    class: Employee
    fields:
      name: String
      startingDate: DateTime?
    

    protocol/company.yaml

    class: Company
    fields:
      name: String
      employees: List<Employee>
      foundedDate: DateTime?
    

    Environment:

    flutter doctor -v
    
    [√] Flutter (Channel beta, 2.9.0-0.1.pre, on Microsoft Windows [Version 10.0.19043.1466], locale en-US)
        • Flutter version 2.9.0-0.1.pre at C:\src\flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 8f1f9c10f0 (5 weeks ago), 2021-12-14 13:41:48 -0800
        • Engine revision 234aca678a
        • Dart version 2.16.0 (build 2.16.0-80.1.beta)
        • DevTools version 2.9.1
    
    [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at C:\Users\abdullah\AppData\Local\Android\sdk
        • Platform android-31, build-tools 30.0.3
        • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
        • All Android licenses accepted.
    
    [√] Chrome - develop for the web
        • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
    
    [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.0.4)
        • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
        • Visual Studio Community 2022 version 17.0.32014.148
        • Windows 10 SDK version 10.0.19041.0
    
    [√] Android Studio (version 2020.3)
        • Android Studio at C:\Program Files\Android\Android Studio
        • Flutter plugin can be installed from:
           https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
           https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    
    [√] VS Code (version 1.63.2)
        • VS Code at C:\Users\abdullah\AppData\Local\Programs\Microsoft VS Code
        • Flutter extension version 3.32.0
    
    [√] Connected device (3 available)
        • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19043.1466]
        • Chrome (web)      • chrome  • web-javascript • Google Chrome 97.0.4692.71
        • Edge (web)        • edge    • web-javascript • Microsoft Edge 96.0.1054.62
    
    • No issues found!
    
    enhancement 
    opened by its-me-mahmud 22
  • No deserialization found for type `RuntimeSettings`

    No deserialization found for type `RuntimeSettings`

    Shubhams-MacBook-Air:serverpod_demo_server shubhamsingh$ dart bin/main.dart SERVERPOD version: 0.9.20 mode: development time: 2022-12-06 05:25:55.398510Z 2022-12-06 05:25:56.127243Z Failed to connect to database. FormatException: No deserialization found for type RuntimeSettings #0 SerializationManager.deserialize (package:serverpod_serialization/src/serialization.dart:73:5) #1 Protocol.deserialize (package:serverpod_demo_server/src/generated/protocol.dart:80:18) #2 DatabaseConnection._formatTableRow (package:serverpod/src/database/database_connection.dart:239:45) #3 DatabaseConnection.find (package:serverpod/src/database/database_connection.dart:178:18) #4 DatabaseConnection.findSingleRow (package:serverpod/src/database/database_connection.dart:199:18) #5 Database.findSingleRow (package:serverpod/src/database/database.dart:86:12) #6 Serverpod.start. (package:serverpod/src/server/serverpod.dart:310:13) #7 Serverpod.start (package:serverpod/src/server/serverpod.dart:299:5) #8 run (package:serverpod_demo_server/server.dart:30:3)

    @yahu1031 @filonov @aldychris @tp @II11II @vlidholt

    opened by Shubhamdsingh 18
  • Rework serialization

    Rework serialization

    This PR reworks the serialization system.

    Main changes:

    • Serialized objects are not warped with a class name any more. For deserialization the expected Type is provided to the system. For each type encountered when running serverpod generate a deserializer is added to the SerializationManager. (streamMessages are still warped. Since there is no type context available.)
    • (De)-Serialization is done recursively. Nested Lists/Maps... are supported.
    • Imports in generated files are scoped.
    • Protocol definitions (yaml) allow referencing data types from other packages. (prefix type with serverpod: or protocol: or module:SERVERPOD_MODULE:, VALID_DART_IMPORT:)
    • Store enums as integers in the database

    Advantages:

    • More efficient network traffic
    • Nested Lists...
    • Easier to maintain (adding new supported types should be straight forward)
    • Even classes that are not generated by serverpod can be send. (Allows developers to use freezed)

    #309

    Pre-launch Checklist

    • [x] I read the Contribute page and followed the process outlined there for submitting PRs.
    • [x] I read and followed the Dart Style Guide and formatted the code with dart format.
    • [x] I listed at least one issue that this PR fixes in the description above.
    • [x] I updated/added relevant documentation (doc comments with ///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.
    • [x] I added new tests to check the change I am making.
    • [x] All existing and new tests are passing.
    • [x] Any breaking changes are documented below.
    • [x] Delete old stuff, that isn't used any more

    If you need help, consider asking for advice on the discussion board.

    Breaking changes

    • Protocol is incompatible with previous versions!
    • See https://github.com/serverpod/serverpod/pull/327#issuecomment-1312173649
    opened by fischerscode 17
  • `serverpod create app_name` breaks with `ProcessException: The system cannot find the file specified.` error in windows

    `serverpod create app_name` breaks with `ProcessException: The system cannot find the file specified.` error in windows

    What I have done

    Installed serverpod_cli in windows. Tried creating myapp. But before that, I tried deleting the existing app. When I create an app, It is created but it fails in the last step - flutter create .. These are logs.

    Deleted existing app

    PS C:\Users\yaswa> rm .\myapp\
    
    Confirm
    The item at C:\Users\yaswa\myapp\ has children and the Recurse parameter was not specified. If you continue, all
    children will be removed with the item. Are you sure you want to continue?
    [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): A
    PS C:\Users\yaswa> ls my*
    PS C:\Users\yaswa>
    

    Created a new app

    PS C:\Users\yaswa> serverpod create myapp
    WARNING! Windows is not officially supported yet. Things may or may not work as expected.
    
    Creating project myapp...
      C:\Users\yaswa/myapp/myapp_serveranalysis_options.yaml
      C:\Users\yaswa/myapp/myapp_serverbin/main.dart
      C:\Users\yaswa/myapp/myapp_serverCHANGELOG.md
      C:\Users\yaswa/myapp/myapp_serverconfig/development.yaml
      C:\Users\yaswa/myapp/myapp_serverconfig/generator.yaml
      C:\Users\yaswa/myapp/myapp_serverconfig/passwords.yaml
      C:\Users\yaswa/myapp/myapp_serverconfig/production.yaml
      C:\Users\yaswa/myapp/myapp_serverconfig/staging.yaml
      C:\Users\yaswa/myapp/myapp_serverdocker-compose.yaml
      C:\Users\yaswa/myapp/myapp_servergenerated/protocol.yaml
      C:\Users\yaswa/myapp/myapp_servergenerated/tables-serverpod.pgsql
      C:\Users\yaswa/myapp/myapp_servergenerated/tables.pgsql
      C:\Users\yaswa/myapp/myapp_servergitignore
      C:\Users\yaswa/myapp/myapp_serverlib/server.dart
      C:\Users\yaswa/myapp/myapp_serverlib/src/endpoints/example_endpoint.dart
      C:\Users\yaswa/myapp/myapp_serverlib/src/future_calls/example_future_call.dart
      C:\Users\yaswa/myapp/myapp_serverlib/src/generated/endpoints.dart
      C:\Users\yaswa/myapp/myapp_serverlib/src/generated/example_class.dart
      C:\Users\yaswa/myapp/myapp_serverlib/src/generated/protocol.dart
      C:\Users\yaswa/myapp/myapp_serverlib/src/protocol/example_class.yaml
      C:\Users\yaswa/myapp/myapp_serverpubspec.yaml
      C:\Users\yaswa/myapp/myapp_serverREADME.md
      C:\Users\yaswa/myapp/myapp_serversetup-tables
      C:\Users\yaswa/myapp/myapp_clientanalysis_options.yaml
      C:\Users\yaswa/myapp/myapp_clientCHANGELOG.md
      C:\Users\yaswa/myapp/myapp_clientgitignore
      C:\Users\yaswa/myapp/myapp_clientlib/PROJECTNAME_client.dart
      C:\Users\yaswa/myapp/myapp_clientlib/src/protocol/client.dart
      C:\Users\yaswa/myapp/myapp_clientlib/src/protocol/example_class.dart
      C:\Users\yaswa/myapp/myapp_clientlib/src/protocol/protocol.dart
      C:\Users\yaswa/myapp/myapp_clientpubspec.yaml
      C:\Users\yaswa/myapp/myapp_clientREADME.md
      C:\Users\yaswa/myapp/myapp_flutteranalysis_options.yaml
      C:\Users\yaswa/myapp/myapp_fluttergitignore
      C:\Users\yaswa/myapp/myapp_flutterlib/main.dart
      C:\Users\yaswa/myapp/myapp_flutterpubspec.yaml
      C:\Users\yaswa/myapp/myapp_flutterREADME.md
      C:\Users\yaswa/myapp/myapp_fluttertest/widget_test.dart
    Running `dart pub get` in C:\Users\yaswa/myapp/myapp_server
    Resolving dependencies...
    + args 2.3.0
    + async 2.8.2
    + buffer 1.1.1
    + charcode 1.3.1
    + collection 1.16.0
    + crypto 3.0.1
    + executor 2.2.2
    + http 0.13.4
    + http_parser 4.0.0
    + lints 1.0.1
    + meta 1.7.0
    + path 1.8.1
    + pedantic 1.11.1
    + postgres 2.4.3
    + redis 2.2.0 (3.0.0 available)
    + retry 3.1.0
    + sasl_scram 0.1.0
    + saslprep 1.0.2
    + serverpod 0.9.5
    + serverpod_client 0.9.5
    + serverpod_postgres_pool 2.1.1
    + serverpod_serialization 0.9.5
    + serverpod_service_client 0.9.5
    + serverpod_shared 0.9.5
    + source_span 1.8.2
    + stack_trace 1.10.0
    + stream_channel 2.1.0
    + string_scanner 1.1.0
    + term_glyph 1.2.0
    + typed_data 1.3.0
    + unorm_dart 0.2.0
    + vm_service 8.2.1
    + web_socket_channel 2.1.0
    + yaml 3.1.0
    Changed 34 dependencies!
    
    Running `dart pub get` in C:\Users\yaswa/myapp/myapp_client
    Resolving dependencies...
    + async 2.8.2
    + charcode 1.3.1
    + collection 1.16.0
    + crypto 3.0.1
    + http 0.13.4
    + http_parser 4.0.0
    + meta 1.7.0
    + path 1.8.1
    + serverpod_client 0.9.5
    + serverpod_serialization 0.9.5
    + source_span 1.8.2
    + stream_channel 2.1.0
    + string_scanner 1.1.0
    + term_glyph 1.2.0
    + typed_data 1.3.0
    + web_socket_channel 2.1.0
    + yaml 3.1.0
    Changed 17 dependencies!
    
    Running `flutter create` in C:\Users\yaswa/myapp/myapp_flutter
    Unhandled exception:
    ProcessException: The system cannot find the file specified.
    
      Command: flutter create .
    #0      _ProcessImpl._start (dart:io-patch/process_patch.dart:401:33)
    #1      Process.start (dart:io-patch/process_patch.dart:38:20)
    #2      _runNonInteractiveProcess (dart:io-patch/process_patch.dart:578:18)
    #3      Process.run (dart:io-patch/process_patch.dart:49:12)
    #4      CommandLineTools.flutterCreate (file:///C:/Users/yaswa/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.5/bin/create/command_line_tools.dart:16:32)
    #5      performCreate (file:///C:/Users/yaswa/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.5/bin/create/create.dart:210:28)
    <asynchronous suspension>
    #6      main (file:///C:/Users/yaswa/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.5/bin/serverpod_cli.dart:218:9)
    <asynchronous suspension>
    WARNING! Windows is not officially supported yet. Things may or may not work as expected.
    
    Project myapp already exists.
    
    enhancement 
    opened by yahu1031 14
  • Serverpod Generate

    Serverpod Generate

    PS C:\moontree\server2\serverv2_server> serverpod generate
    WARNING! Windows is not officially supported yet. Things may or may not work as expected.
    
    Running serverpod generate.
    Failed to generate lib\src\generated\asset_class.dart
    Yikes! It is possible that this error is caused by an internal issue with the
    Serverpod tooling. We would appreciate if you filed an issue over at Github. Please   
    include the stack trace below and describe any steps you did to trigger the error.    
    https://github.com/serverpod/serverpod/issues
    FileSystemException: Cannot create file, path = 'lib\src\generated\asset_class.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    #0      _File.throwIfError (dart:io/file_impl.dart:635:7)
    #1      _File.createSync (dart:io/file_impl.dart:273:5)
    #2      ClassGenerator.generate (file:///C:/Users/jorda/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.20/bin/generator/class_generator.dart:72:20)      
    #3      performGenerateClasses (file:///C:/Users/jorda/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.20/bin/generator/class_generator.dart:28:19)       
    #4      performGenerate (file:///C:/Users/jorda/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.20/bin/generator/generator.dart:56:3)
    <asynchronous suspension>
    #5      _main (file:///C:/Users/jorda/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.20/bin/serverpod_cli.dart:201:7)
    <asynchronous suspension>
    #6      main.<anonymous closure> (file:///C:/Users/jorda/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.20/bin/serverpod_cli.dart:33:9)
    <asynchronous suspension>
    #7      main (file:///C:/Users/jorda/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.20/bin/serverpod_cli.dart:30:3)
    <asynchronous suspension>
    
    
    Failed to generate lib\src\generated\asset_metadata_class.dart
    Yikes! It is possible that this error is caused by an internal issue with the
    Serverpod tooling. We would appreciate if you filed an issue over at Github. Please   
    include the stack trace below and describe any steps you did to trigger the error.    
    https://github.com/serverpod/serverpod/issues
    FileSystemException: Cannot create file, path = 'lib\src\generated\asset_metadata_class.dart' (OS Error: The system cannot find the path specified.
    , errno = 3)
    #0      _File.throwIfError (dart:io/file_impl.dart:635:7)
    #1      _File.createSync (dart:io/file_impl.dart:273:5)
    #2      ClassGenerator.generate (file:///C:/Users/jorda/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.20/bin/generator/class_generator.dart:72:20)      
    #3      performGenerateClasses (file:///C:/Users/jorda/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.20/bin/generator/class_generator.dart:28:19)       
    #4      performGenerate (file:///C:/Users/jorda/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.20/bin/generator/generator.dart:56:3)
    <asynchronous suspension>
    #5      _main (file:///C:/Users/jorda/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.20/bin/serverpod_cli.dart:201:7)
    <asynchronous suspension>
    #6      main.<anonymous closure> (file:///C:/Users/jorda/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.20/bin/serverpod_cli.dart:33:9)
    <asynchronous suspension>
    #7      main (file:///C:/Users/jorda/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/serverpod_cli-0.9.20/bin/serverpod_cli.dart:30:3)
    <asynchronous suspension>
    ...
    

    seemed to work fine after I manually made the generated folder (which wasn't present because it is .gitignored).

    might just want to create this folder at the beginning of the process if it isn't there.

    opened by lastmeta 12
  • fix: `Failed to run serverpod. You need to have dart installed and in your $PATH`

    fix: `Failed to run serverpod. You need to have dart installed and in your $PATH`

    On Windows, this is the check that's being run to verify that Dart is indeed present in the PATH:

    https://github.com/serverpod/serverpod/blob/e529b9333ce6057fd53d16d86597c14c34bc142c/tools/serverpod_cli/bin/serverpod_cli.dart#L44

    This will cause an error, as the file is not named just dart, but dart.exe

    bug 
    opened by tomassasovsky 12
  • Tried to signup with Email Auth ('serverpod_email_auth') Table not generated

    Tried to signup with Email Auth ('serverpod_email_auth') Table not generated

    SERVERPOD version: 0.9.7 mode: development
    Insights listening on port 8281
    Server id 0 listening on port 8280
    METHOD CALL: serverpod_auth.email.createAccountRequest duration: 70ms numQueries: 1 authenticatedUser: null
    METHOD CALL: serverpod_auth.status.getUserInfo duration: 3ms numQueries: 0 authenticatedUser: null
    METHOD CALL: serverpod_auth.email.authenticate duration: 10ms numQueries: 1 authenticatedUser: null
    PostgreSQLSeverity.error 42P01: relation "serverpod_email_auth" does not exist 
    package:postgres/src/connection.dart 453:18                            _PostgreSQLExecutionContextMixin._query
    package:postgres/src/connection.dart 427:7                             _PostgreSQLExecutionContextMixin.query
    package:postgres/src/connection.dart 482:22                            _PostgreSQLExecutionContextMixin.mappedResultsQuery
    package:serverpod_postgres_pool/postgres_pool.dart 750:23              _PgExecutionContextWrapper.mappedResultsQuery.<fn> 
    package:serverpod_postgres_pool/postgres_pool.dart 678:27              _PgExecutionContextWrapper._run
    package:serverpod_postgres_pool/postgres_pool.dart 749:12              _PgExecutionContextWrapper.mappedResultsQuery      
    package:serverpod_postgres_pool/postgres_pool.dart 614:16              PgPool.mappedResultsQuery.<fn>
    package:serverpod_postgres_pool/postgres_pool.dart 319:22              PgPool.run.<fn>.<fn>
    package:serverpod_postgres_pool/postgres_pool.dart 418:27              PgPool._useOrCreate
    package:serverpod_postgres_pool/postgres_pool.dart 390:14              PgPool._withConnection.<fn>
    package:executor/src/executor_impl.dart 61:19                          _Executor.scheduleTask
    package:serverpod_postgres_pool/postgres_pool.dart 318:18              PgPool.run.<fn>
    package:retry/retry.dart 131:16                                        RetryOptions.retry
    package:serverpod_postgres_pool/postgres_pool.dart 316:14              PgPool.run
    package:serverpod/src/database/database_connection.dart 171:20         DatabaseConnection.find
    package:serverpod/src/database/database_connection.dart 199:18         DatabaseConnection.findSingleRow
    package:serverpod/src/database/database.dart 86:12                     Database.findSingleRow
    package:serverpod_auth_server/src/endpoints/email_endpoint.dart 25:17  EmailEndpoint.authenticate
    package:serverpod/src/server/endpoint_dispatch.dart 115:20             EndpointDispatch.handleUriCall
    package:serverpod/src/server/server.dart 220:18                        Server._handleRequest
    ===== asynchronous gap ===========================
    package:serverpod_postgres_pool/postgres_pool.dart 318:18              PgPool.run.<fn>
    package:retry/retry.dart 131:16                                        RetryOptions.retry
    package:serverpod_postgres_pool/postgres_pool.dart 316:14              PgPool.run
    package:serverpod/src/database/database_connection.dart 171:20         DatabaseConnection.find
    package:serverpod/src/database/database_connection.dart 199:18         DatabaseConnection.findSingleRow
    package:serverpod/src/database/database.dart 86:12                     Database.findSingleRow
    package:serverpod_auth_server/src/endpoints/email_endpoint.dart 25:17  EmailEndpoint.authenticate
    package:serverpod/src/server/endpoint_dispatch.dart 115:20             EndpointDispatch.handleUriCall
    package:serverpod/src/server/server.dart 220:18                        Server._handleRequest
    
    DEBUG: authenticate [email protected] / 123456777
    METHOD CALL: serverpod_auth.status.getUserInfo duration: 0ms numQueries: 0 authenticatedUser: null
    
    opened by anandsubbu007 12
  • CORS is NOT set to `Access-Control-Allow-Origin: *` if the endpoint fails

    CORS is NOT set to `Access-Control-Allow-Origin: *` if the endpoint fails

      By default the CORS is set to `Access-Control-Allow-Origin: *`, which should allow all origins.
    

    Originally posted by @vlidholt in https://github.com/serverpod/serverpod/discussions/82#discussioncomment-2126641

    But this does not happen when the endpoint throws an error.

    bug 
    opened by AndryHTC 10
  • feat: add support snack case for fields

    feat: add support snack case for fields

    Replace this paragraph with a description of what this PR is changing or adding, and why.

    List which issues are fixed by this PR. You must list at least one issue.

    Pre-launch Checklist

    • [X] I read the Contribute page and followed the process outlined there for submitting PRs.
    • [X] This update cointains only one single feature or bug fix and nothing else. (If you are submitting multiple fixes, please make multiple PRs.)
    • [X] I read and followed the Dart Style Guide and formatted the code with dart format.
    • [X] I listed at least one issue that this PR fixes in the description above.
    • [ ] I updated/added relevant documentation (doc comments with ///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.
    • [ ] I added new tests to check the change I am making.
    • [X] All existing and new tests are passing.
    • [ ] Any breaking changes are documented below.

    If you need help, consider asking for advice on the discussion board.

    Breaking changes

    If you have done any breaking changes, make sure to outline them here, so that they can be included in the notes for the next release.

    opened by II11II 9
  • Update and simplify examples

    Update and simplify examples

    Make sure all examples are working with new serialization.

    • [x] Authentication
    • [x] Chat (create a new project for the chat)
    • [x] Pixorama (also fix possible caching issues)
    enhancement 
    opened by vlidholt 9
  • `module` template throws error and crashes CLI

    `module` template throws error and crashes CLI

    Logs
    Unhandled exception:
    ProcessException: No such file or directory
      Command: ./setup-tables
    #0      _ProcessImpl._start (dart:io-patch/process_patch.dart:401:33)
    #1      Process.start (dart:io-patch/process_patch.dart:38:20)
    #2      CommandLineTools.createTables (file:///Users/nabeelparkar/.pub-cache/hosted/pub.dartlang.org/serverpod_cli-0.9.8/bin/util/command_line_tools.dart:58:33)
    <asynchronous suspension>
    #3      performCreate (file:///Users/nabeelparkar/.pub-cache/hosted/pub.dartlang.org/serverpod_cli-0.9.8/bin/create/create.dart:340:5)
    <asynchronous suspension>
    #4      main (file:///Users/nabeelparkar/.pub-cache/hosted/pub.dartlang.org/serverpod_cli-0.9.8/bin/serverpod_cli.dart:220:9)
    <asynchronous suspension>
    
    bug 
    opened by exaby73 9
  • Serverpod auth example client can't reach server

    Serverpod auth example client can't reach server

    Please see discussion thread in https://github.com/serverpod/serverpod/discussions/541 , but I will copy the important information here.

    I copied code from serverpod/examples/auth_example/auth_example_flutter/ to my own Flutter project. This project was able to successfully connect to the serverpod server in its module before I added this code.

    However, the auth code does not seem to be able to contact the server. It seems to be using the wrong port (56888, not 8080):

    I/flutter ( 4355): Failed call: serverpod_auth.google.authenticateWithServerAuthCode
    I/flutter ( 4355): SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = localhost, port = 56888
    I/flutter ( 4355): serverpod_auth_google: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = localhost, port = 56888
    I/flutter ( 4355): #0      _NativeSocket.startConnect (dart:io-patch/socket_patch.dart:682:35)
    I/flutter ( 4355): #1      _RawSocket.startConnect (dart:io-patch/socket_patch.dart:1827:26)
    I/flutter ( 4355): #2      RawSocket.startConnect (dart:io-patch/socket_patch.dart:27:23)
    I/flutter ( 4355): #3      Socket._startConnect (dart:io-patch/socket_patch.dart:2048:22)
    I/flutter ( 4355): #4      Socket.startConnect (dart:io/socket.dart:759:21)
    I/flutter ( 4355): #5      _ConnectionTarget.connect (dart:_http/http_impl.dart:2453:20)
    I/flutter ( 4355): #6      _HttpClient._getConnection.connect (dart:_http/http_impl.dart:2867:12)
    I/flutter ( 4355): #7      _HttpClient._getConnection (dart:_http/http_impl.dart:2872:12)
    I/flutter ( 4355): #8      _HttpClient._openUrl (dart:_http/http_impl.dart:2727:12)
    I/flutter ( 4355): #9      _HttpClient.postUrl (dart:_http/http_impl.dart:2601:49)
    I/flutter ( 4355): #10     ServerpodClient.callServerEndpoint
    package:serverpod_client/src/serverpod_client_io.dart:71
    I/flutter ( 4355): <asynchronous suspension>
    I/flutter ( 4355): #11     signInWithGoogle
    package:serverpod_auth_google_flutter/src/auth.dart:70
    I/flutter ( 4355): <asynchronous suspension>
    

    The correct URL http://localhost:8080/serverpod_auth.google is being fetched by serverpod_client_io.dart:71 as:

          var request = await _httpClient.postUrl(url);
    

    However this throws an exception stating the wrong port number:

    address: _InternetAddress (InternetAddress('127.0.0.1', IPv4))
    message: "Connection refused"
    osError: OSError (OS Error: Connection refused, errno = 111)
    port: 55074
    hashCode: 721684399
    runtimeType: Type (SocketException)
    

    The endpoint serverpod_auth.google is in fact being correctly registered in the server -- in mypod_server/lib/src/generated/endpoints.dart I see:

    import 'package:serverpod_auth_server/module.dart' as _i3;
    // ...
        modules['serverpod_auth'] = _i3.Endpoints()..initializeEndpoints(server);
    

    If I visit http://localhost:8080/serverpod_auth.google in a web browser, I get a 400 error, so at least it's not giving Connection refused.

    I have stepped through the code in the debugger to the extent that I could, and I can't see any reason this should be failing, so I suspect there may be some sort of bug here that I triggered.

    opened by lukehutch 3
  • Added Cloud Run Support

    Added Cloud Run Support

    Added Cloud Run Support by creating a separate Workflow and documented the steps which need to be followed along with screen shorts

    https://github.com/serverpod/serverpod_docs/pull/4

    List which issues are fixed by this PR. You must list at least one issue.

    Deployment Support to Cloud Run

    Pre-launch Checklist

    • [x] I read the Contribute page and followed the process outlined there for submitting PRs.
    • [x] This update cointains only one single feature or bug fix and nothing else. (If you are submitting multiple fixes, please make multiple PRs.)
    • [x] I read and followed the Dart Style Guide and formatted the code with dart format.
    • [x] I listed at least one issue that this PR fixes in the description above.
    • [x] I updated/added relevant documentation (doc comments with ///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.
    • [ ] I added new tests to check the change I am making.
    • [x] All existing and new tests are passing.
    • [x] Any breaking changes are documented below.
    opened by ajay-k07 2
  • type 'Null' is not a subtype of type 'List<dynamic>' in type cast

    type 'Null' is not a subtype of type 'List' in type cast

    I have a table called city that has id, a1, and a2 columns, I want to do a union all query and get the sum of the particularly same rows, this is my endpoint:

      Future<List<List<dynamic>>> fetchMatchedCity(Session session) async {
        session.log("querying match...");
        final start = DateTime.now().millisecond;
    
        final result = await session.db.query(""" select id1, id2, sum(score) from (
    	    select t1.id as id1 , t2.id as id2, 1 as score from city as t1, city as t2 where t1.a1 = t2.a1 and t1.id <> t2.id union all
            select t1.id as id1 , t2.id as id2, 1 as score from city as t1, city as t2 where t1.a2 = t2.a2 and t1.id <> t2.id
        ) as final
        where id1 > id2
        group by (id1, id2) order by sum(score) desc  """);
    
        return result;
      }
    

    in main.dart:

    ....
    onPressed: () async {
      await client.city.fetchMatchedCity();
    }
    

    I removed the usage of the result of await client.city.fetchMatchedCity(); due to reduce the risk of errors! but I still get following error:

    flutter: FormatException: No deserialization found for type dynamic
    [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: No deserialization found for type dynamic
    #0      SerializationManager.deserialize (package:serverpod_serialization/src/serialization.dart:73:5)
    #1      Protocol.deserialize (package:hlafit_client/src/protocol/protocol.dart:107:18)
    #2      Protocol.deserialize.<anonymous closure> (package:hlafit_client/src/protocol/protocol.dart:96:40)
    #3      MappedListIterable.elementAt (dart:_internal/iterable.dart:413:31)
    #4      ListIterator.moveNext (dart:_internal/iterable.dart:342:26)
    #5      new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
    #6      new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
    #7      new List.of (dart:core-patch/array_patch.dart:51:28)
    

    P.S: Query is working on db management applications like postico.

    enhancement 
    opened by alizera 12
  • `serverpod create testpod` fails 80% of the time

    `serverpod create testpod` fails 80% of the time

    serverpod create testpod fails 80% of the time with:

    Setting up Docker and default database tables in /home/luke/Work/testpod/testpod_server
    If you run serverpod create for the first time, this can take a few minutes as Docker is downloading the images for Postgres. If you get stuck at this
    step, make sure that you have the latest version of Docker Desktop and that it is currently running.
    
    Starting docker
    Recreating testpod_server_postgres_1 ... 
    Recreating testpod_server_redis_1    ... 
    Recreating testpod_server_postgres_1 ... done
    Recreating testpod_server_redis_1    ... done
    Postgres is ready
    Creating testpod_server_postgres_run ... 
    Creating testpod_server_postgres_run ... done
    psql: error: connection to server at "postgres" (172.21.0.3), port 5432 failed: FATAL:  password authentication failed for user "postgres"
    2
    Stopping docker
    Stopping testpod_server_postgres_1 ... 
    Stopping testpod_server_redis_1    ... 
    Stopping testpod_server_postgres_1 ... done
    Stopping testpod_server_redis_1    ... done
    Completed table setup exit code: 0
    Cleaning up
    

    It seems to be a race condition though, because I have had it succeed on the odd occasion. If this happens, then the testpod server can't connect to posgres: https://github.com/serverpod/serverpod/discussions/521

    opened by lukehutch 5
  • fix: don't need to run setup-tables script manually in windows

    fix: don't need to run setup-tables script manually in windows

    We don't need to run setup-tables.cmd manually in windows.

    Pre-launch Checklist

    • [X] I read the Contribute page and followed the process outlined there for submitting PRs.
    • [X] This update contains only one single feature or bug fix and nothing else. (If you are submitting multiple fixes, please make multiple PRs.)
    • [X] I read and followed the Dart Style Guide and formatted the code with dart format.
    • [ ] I listed at least one issue that this PR fixes in the description above.
    • [X] I updated/added relevant documentation (doc comments with ///), and made sure that the document follows the same style as other Serverpod documentation. I checked spelling and grammar.
    • [ ] I added new tests to check the change I am making.
    • [X] All existing and new tests are passing.
    • [X] Any breaking changes are documented below.

    Results

    Windows Logs
    PS C:\Users\yaswa> serverpod create hey
    Building package executable...
    Built serverpod_cli:serverpod_cli.
    WARNING! Windows is not officially supported yet. Things may or may not work as expected.
    
    Development mode. Using templates from: F:\Projects\serverpod\templates\serverpod_templates
    SERVERPOD_HOME is set to F:\Projects\serverpod
    Creating project hey...
      C:\Users\yaswa\hey\hey_server\analysis_options.yaml
      C:\Users\yaswa\hey\hey_server\aws\scripts\appspec.yml
      C:\Users\yaswa\hey\hey_server\aws\scripts\install_dependencies
      C:\Users\yaswa\hey\hey_server\aws\scripts\run_serverpod
      C:\Users\yaswa\hey\hey_server\aws\scripts\start_server
      C:\Users\yaswa\hey\hey_server\aws\terraform\balancers-staging.tf
      C:\Users\yaswa\hey\hey_server\aws\terraform\balancers.tf
      C:\Users\yaswa\hey\hey_server\aws\terraform\cloudfront-web-staging.tf
      C:\Users\yaswa\hey\hey_server\aws\terraform\cloudfront-web.tf
      C:\Users\yaswa\hey\hey_server\aws\terraform\code-deploy.tf
      C:\Users\yaswa\hey\hey_server\aws\terraform\config.auto.tfvars
      C:\Users\yaswa\hey\hey_server\aws\terraform\database.tf
      C:\Users\yaswa\hey\hey_server\aws\terraform\gitignore
      C:\Users\yaswa\hey\hey_server\aws\terraform\init-script.sh
      C:\Users\yaswa\hey\hey_server\aws\terraform\instances.tf
      C:\Users\yaswa\hey\hey_server\aws\terraform\main.tf
      C:\Users\yaswa\hey\hey_server\aws\terraform\redis.tf
      C:\Users\yaswa\hey\hey_server\aws\terraform\staging.tf
      C:\Users\yaswa\hey\hey_server\aws\terraform\storage.tf
      C:\Users\yaswa\hey\hey_server\aws\terraform\variables.tf
      C:\Users\yaswa\hey\hey_server\aws\terraform\vpc.tf
      C:\Users\yaswa\hey\hey_server\bin\main.dart
      C:\Users\yaswa\hey\hey_server\CHANGELOG.md
      C:\Users\yaswa\hey\hey_server\config\development.yaml
      C:\Users\yaswa\hey\hey_server\config\generator.yaml
      C:\Users\yaswa\hey\hey_server\config\passwords.yaml
      C:\Users\yaswa\hey\hey_server\config\production.yaml
      C:\Users\yaswa\hey\hey_server\config\staging.yaml
      C:\Users\yaswa\hey\hey_server\docker-compose.yaml
      C:\Users\yaswa\hey\hey_server\generated\protocol.yaml
      C:\Users\yaswa\hey\hey_server\generated\tables-serverpod.pgsql
      C:\Users\yaswa\hey\hey_server\generated\tables.pgsql
      C:\Users\yaswa\hey\hey_server\gitignore
      C:\Users\yaswa\hey\hey_server\lib\server.dart
      C:\Users\yaswa\hey\hey_server\lib\src\endpoints\example_endpoint.dart
      C:\Users\yaswa\hey\hey_server\lib\src\future_calls\example_future_call.dart
      C:\Users\yaswa\hey\hey_server\lib\src\generated\endpoints.dart
      C:\Users\yaswa\hey\hey_server\lib\src\generated\example_class.dart
      C:\Users\yaswa\hey\hey_server\lib\src\generated\protocol.dart
      C:\Users\yaswa\hey\hey_server\lib\src\protocol\example_class.yaml
      C:\Users\yaswa\hey\hey_server\lib\src\web\routes\root.dart
      C:\Users\yaswa\hey\hey_server\lib\src\web\widgets\default_page_widget.dart
      C:\Users\yaswa\hey\hey_server\pubspec.yaml
      C:\Users\yaswa\hey\hey_server\README.md
      C:\Users\yaswa\hey\hey_server\setup-tables
      C:\Users\yaswa\hey\hey_server\setup-tables.cmd
      C:\Users\yaswa\hey\hey_server\web\static\serverpod-logo.svg
      C:\Users\yaswa\hey\hey_server\web\static\style.css
      C:\Users\yaswa\hey\hey_server\web\templates\default.html
      C:\Users\yaswa\hey\hey_client\analysis_options.yaml
      C:\Users\yaswa\hey\hey_client\CHANGELOG.md
      C:\Users\yaswa\hey\hey_client\gitignore
      C:\Users\yaswa\hey\hey_client\lib\projectname_client.dart
      C:\Users\yaswa\hey\hey_client\lib\src\protocol\client.dart
      C:\Users\yaswa\hey\hey_client\lib\src\protocol\example_class.dart
      C:\Users\yaswa\hey\hey_client\lib\src\protocol\protocol.dart
      C:\Users\yaswa\hey\hey_client\pubspec.yaml
      C:\Users\yaswa\hey\hey_client\README.md
      C:\Users\yaswa\hey\hey_flutter\analysis_options.yaml
      C:\Users\yaswa\hey\hey_flutter\gitignore
      C:\Users\yaswa\hey\hey_flutter\lib\main.dart
      C:\Users\yaswa\hey\hey_flutter\pubspec.yaml
      C:\Users\yaswa\hey\hey_flutter\README.md
      C:\Users\yaswa\hey\hey_flutter\test\widget_test.dart
      C:\Users\yaswa\hey\.github\workflows\deployment-aws.yml
    
    Running `dart pub get` in C:\Users\yaswa\hey\hey_server
    Resolving dependencies...
    + args 2.3.1
    + async 2.10.0
    + buffer 1.1.1
    + collection 1.17.0
    + crypto 3.0.2
    + executor 2.2.2
    + http 0.13.5
    + http_parser 4.0.2
    + lints 1.0.1 (2.0.1 available)
    + meta 1.8.0
    + mustache_template 2.0.0
    + path 1.8.3
    + pedantic 1.11.1
    + postgres 2.5.2
    + postgres_pool 2.1.5
    + redis 3.1.0
    + retry 3.1.0
    + sasl_scram 0.1.1
    + saslprep 1.0.2
    + serverpod 0.9.21
    + serverpod_client 0.9.21
    + serverpod_serialization 0.9.21
    + serverpod_service_client 0.9.21
    + serverpod_shared 0.9.21
    + source_span 1.9.1
    + stack_trace 1.11.0
    + stream_channel 2.1.1
    + string_scanner 1.2.0
    + synchronized 3.0.0+3
    + system_resources 1.6.0
    + term_glyph 1.2.1
    + typed_data 1.3.1
    + unorm_dart 0.2.0
    + vm_service 9.4.0
    + web_socket_channel 2.2.0
    + yaml 3.1.1
    Changed 36 dependencies!
    
    Running `dart pub get` in C:\Users\yaswa\hey\hey_client
    Resolving dependencies...
    + async 2.10.0
    + collection 1.17.0
    + crypto 3.0.2
    + http 0.13.5
    + http_parser 4.0.2
    + meta 1.8.0
    + path 1.8.3
    + serverpod_client 0.9.21
    + serverpod_serialization 0.9.21
    + source_span 1.9.1
    + stream_channel 2.1.1
    + string_scanner 1.2.0
    + term_glyph 1.2.1
    + typed_data 1.3.1
    + web_socket_channel 2.2.0
    + yaml 3.1.1
    Changed 16 dependencies!
    
    Running `flutter create .` in C:\Users\yaswa\hey\hey_flutter
    Recreating project ....
      .idea\libraries\Dart_SDK.xml (created)
      .idea\libraries\KotlinJavaRuntime.xml (created)
      .idea\modules.xml (created)
      .idea\runConfigurations\main_dart.xml (created)
      .idea\workspace.xml (created)
      android\app\build.gradle (created)
      android\app\src\main\kotlin\com\example\hey_flutter\MainActivity.kt (created)
      android\build.gradle (created)
      android\hey_flutter_android.iml (created)
      android\.gitignore (created)
      android\app\src\debug\AndroidManifest.xml (created)
      android\app\src\main\AndroidManifest.xml (created)
      android\app\src\main\res\drawable\launch_background.xml (created)
      android\app\src\main\res\drawable-v21\launch_background.xml (created)
      android\app\src\main\res\mipmap-hdpi\ic_launcher.png (created)
      android\app\src\main\res\mipmap-mdpi\ic_launcher.png (created)
      android\app\src\main\res\mipmap-xhdpi\ic_launcher.png (created)
      android\app\src\main\res\mipmap-xxhdpi\ic_launcher.png (created)
      android\app\src\main\res\mipmap-xxxhdpi\ic_launcher.png (created)
      android\app\src\main\res\values\styles.xml (created)
      android\app\src\main\res\values-night\styles.xml (created)
      android\app\src\profile\AndroidManifest.xml (created)
      android\gradle\wrapper\gradle-wrapper.properties (created)
      android\gradle.properties (created)
      android\settings.gradle (created)
      ios\Runner\AppDelegate.swift (created)
      ios\Runner\Runner-Bridging-Header.h (created)
      ios\Runner.xcodeproj\project.pbxproj (created)
      ios\Runner.xcodeproj\xcshareddata\xcschemes\Runner.xcscheme (created)
      ios\.gitignore (created)
      ios\Flutter\AppFrameworkInfo.plist (created)
      ios\Flutter\Debug.xcconfig (created)
      ios\Flutter\Release.xcconfig (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\Contents.json (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\AppIcon.appiconset\[email protected] (created)
      ios\Runner\Assets.xcassets\LaunchImage.imageset\Contents.json (created)
      ios\Runner\Assets.xcassets\LaunchImage.imageset\LaunchImage.png (created)
      ios\Runner\Assets.xcassets\LaunchImage.imageset\[email protected] (created)
      ios\Runner\Assets.xcassets\LaunchImage.imageset\[email protected] (created)
      ios\Runner\Assets.xcassets\LaunchImage.imageset\README.md (created)
      ios\Runner\Base.lproj\LaunchScreen.storyboard (created)
      ios\Runner\Base.lproj\Main.storyboard (created)
      ios\Runner\Info.plist (created)
      ios\Runner.xcodeproj\project.xcworkspace\contents.xcworkspacedata (created)
      ios\Runner.xcodeproj\project.xcworkspace\xcshareddata\IDEWorkspaceChecks.plist (created)
      ios\Runner.xcodeproj\project.xcworkspace\xcshareddata\WorkspaceSettings.xcsettings (created)
      ios\Runner.xcworkspace\contents.xcworkspacedata (created)
      ios\Runner.xcworkspace\xcshareddata\IDEWorkspaceChecks.plist (created)
      ios\Runner.xcworkspace\xcshareddata\WorkspaceSettings.xcsettings (created)
      linux\.gitignore (created)
      linux\CMakeLists.txt (created)
      linux\flutter\CMakeLists.txt (created)
      linux\main.cc (created)
      linux\my_application.cc (created)
      linux\my_application.h (created)
      macos\.gitignore (created)
      macos\Flutter\Flutter-Debug.xcconfig (created)
      macos\Flutter\Flutter-Release.xcconfig (created)
      macos\Runner\AppDelegate.swift (created)
      macos\Runner\Assets.xcassets\AppIcon.appiconset\app_icon_1024.png (created)
      macos\Runner\Assets.xcassets\AppIcon.appiconset\app_icon_128.png (created)
      macos\Runner\Assets.xcassets\AppIcon.appiconset\app_icon_16.png (created)
      macos\Runner\Assets.xcassets\AppIcon.appiconset\app_icon_256.png (created)
      macos\Runner\Assets.xcassets\AppIcon.appiconset\app_icon_32.png (created)
      macos\Runner\Assets.xcassets\AppIcon.appiconset\app_icon_512.png (created)
      macos\Runner\Assets.xcassets\AppIcon.appiconset\app_icon_64.png (created)
      macos\Runner\Assets.xcassets\AppIcon.appiconset\Contents.json (created)
      macos\Runner\Base.lproj\MainMenu.xib (created)
      macos\Runner\Configs\AppInfo.xcconfig (created)
      macos\Runner\Configs\Debug.xcconfig (created)
      macos\Runner\Configs\Release.xcconfig (created)
      macos\Runner\Configs\Warnings.xcconfig (created)
      macos\Runner\DebugProfile.entitlements (created)
      macos\Runner\Info.plist (created)
      macos\Runner\MainFlutterWindow.swift (created)
      macos\Runner\Release.entitlements (created)
      macos\Runner.xcodeproj\project.pbxproj (created)
      macos\Runner.xcodeproj\project.xcworkspace\xcshareddata\IDEWorkspaceChecks.plist (created)
      macos\Runner.xcodeproj\xcshareddata\xcschemes\Runner.xcscheme (created)
      macos\Runner.xcworkspace\contents.xcworkspacedata (created)
      macos\Runner.xcworkspace\xcshareddata\IDEWorkspaceChecks.plist (created)
      hey_flutter.iml (created)
      web\favicon.png (created)
      web\icons\Icon-192.png (created)
      web\icons\Icon-512.png (created)
      web\icons\Icon-maskable-192.png (created)
      web\icons\Icon-maskable-512.png (created)
      web\index.html (created)
      web\manifest.json (created)
      windows\.gitignore (created)
      windows\CMakeLists.txt (created)
      windows\flutter\CMakeLists.txt (created)
      windows\runner\CMakeLists.txt (created)
      windows\runner\flutter_window.cpp (created)
      windows\runner\flutter_window.h (created)
      windows\runner\main.cpp (created)
      windows\runner\resource.h (created)
      windows\runner\resources\app_icon.ico (created)
      windows\runner\runner.exe.manifest (created)
      windows\runner\Runner.rc (created)
      windows\runner\utils.cpp (created)
      windows\runner\utils.h (created)
      windows\runner\win32_window.cpp (created)
      windows\runner\win32_window.h (created)
    Running "flutter pub get" in hey_flutter...                      2,105ms
    Wrote 121 files.
    
    All done!
    In order to run your application, type:
    
      $ cd .
      $ flutter run
    
    Your application code is in .\lib\main.dart.
    
    
    Setting up Docker and default database tables in C:\Users\yaswa\hey\hey_server
    If you run serverpod create for the first time, this can take a few minutes as Docker is downloading the images for
    Postgres. If you get stuck at this step, make sure that you have the latest version of Docker Desktop and that it is
    currently running.
    Starting docker
    Network hey_server_default  Creating
    Network hey_server_default  Created
    Volume "hey_server_hey_data"  Creating
    Volume "hey_server_hey_data"  Created
    Container hey_server-postgres-1  Creating
    Container hey_server-redis-1  Creating
    Container hey_server-postgres-1  Created
    Container hey_server-redis-1  Created
    Container hey_server-redis-1  Starting
    Container hey_server-postgres-1  Starting
    Container hey_server-postgres-1  Started
    Container hey_server-redis-1  Started
    Waiting for Postgres...
    Postgres is ready
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE INDEX
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE TABLE
    ALTER TABLE
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE INDEX
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    ALTER TABLE
    CREATE TABLE
    ALTER TABLE
    ALTER TABLE
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    ALTER TABLE
    Stopping docker
    Container hey_server-redis-1  Stopping
    Container hey_server-postgres-1  Stopping
    Container hey_server-redis-1  Stopped
    Container hey_server-postgres-1  Stopped
    Completed table setup exit code: 0
    Cleaning up
    Completed cleanup exit code: 0
    Cleaning up
    
    
    ====================
    SERVERPOD CREATED :D
    ====================
    
    All setup. You are ready to rock!
    
    Start your Serverpod by running:
    
      $ cd .\hey\hey_server\
      $ docker-compose up --build --detach
      $ dart .\bin\main.dart
    
    MacOS Logs
    ➜  ~ serverpod create hey
    Development mode. Using templates from: /Users/mr.minnu/.serverpod/templates/serverpod_templates
    SERVERPOD_HOME is set to /Users/mr.minnu/.serverpod
    Creating project hey...
      /Users/mr.minnu/hey/hey_server/generated/tables-serverpod.pgsql
      /Users/mr.minnu/hey/hey_server/generated/protocol.yaml
      /Users/mr.minnu/hey/hey_server/generated/tables.pgsql
      /Users/mr.minnu/hey/hey_server/docker-compose.yaml
      /Users/mr.minnu/hey/hey_server/bin/main.dart
      /Users/mr.minnu/hey/hey_server/CHANGELOG.md
      /Users/mr.minnu/hey/hey_server/setup-tables.cmd
      /Users/mr.minnu/hey/hey_server/config/generator.yaml
      /Users/mr.minnu/hey/hey_server/config/staging.yaml
      /Users/mr.minnu/hey/hey_server/config/production.yaml
      /Users/mr.minnu/hey/hey_server/config/development.yaml
      /Users/mr.minnu/hey/hey_server/config/passwords.yaml
      /Users/mr.minnu/hey/hey_server/web/static/css/style.css
      /Users/mr.minnu/hey/hey_server/web/static/images/background.svg
      /Users/mr.minnu/hey/hey_server/web/static/images/serverpod-logo.svg
      /Users/mr.minnu/hey/hey_server/web/templates/default.html
      /Users/mr.minnu/hey/hey_server/README.md
      /Users/mr.minnu/hey/hey_server/pubspec.yaml
      /Users/mr.minnu/hey/hey_server/setup-tables
      /Users/mr.minnu/hey/hey_server/lib/server.dart
      /Users/mr.minnu/hey/hey_server/lib/src/generated/endpoints.dart
      /Users/mr.minnu/hey/hey_server/lib/src/generated/protocol.dart
      /Users/mr.minnu/hey/hey_server/lib/src/generated/example.dart
      /Users/mr.minnu/hey/hey_server/lib/src/endpoints/example_endpoint.dart
      /Users/mr.minnu/hey/hey_server/lib/src/future_calls/example_future_call.dart
      /Users/mr.minnu/hey/hey_server/lib/src/web/routes/root.dart
      /Users/mr.minnu/hey/hey_server/lib/src/web/widgets/default_page_widget.dart
      /Users/mr.minnu/hey/hey_server/lib/src/protocol/example.yaml
      /Users/mr.minnu/hey/hey_server/analysis_options.yaml
      /Users/mr.minnu/hey/hey_server/aws/terraform/cloudfront-web.tf
      /Users/mr.minnu/hey/hey_server/aws/terraform/cloudfront-web-staging.tf
      /Users/mr.minnu/hey/hey_server/aws/terraform/staging.tf
      /Users/mr.minnu/hey/hey_server/aws/terraform/config.auto.tfvars
      /Users/mr.minnu/hey/hey_server/aws/terraform/main.tf
      /Users/mr.minnu/hey/hey_server/aws/terraform/storage.tf
      /Users/mr.minnu/hey/hey_server/aws/terraform/init-script.sh
      /Users/mr.minnu/hey/hey_server/aws/terraform/redis.tf
      /Users/mr.minnu/hey/hey_server/aws/terraform/balancers.tf
      /Users/mr.minnu/hey/hey_server/aws/terraform/database.tf
      /Users/mr.minnu/hey/hey_server/aws/terraform/variables.tf
      /Users/mr.minnu/hey/hey_server/aws/terraform/code-deploy.tf
      /Users/mr.minnu/hey/hey_server/aws/terraform/instances.tf
      /Users/mr.minnu/hey/hey_server/aws/terraform/balancers-staging.tf
      /Users/mr.minnu/hey/hey_server/aws/terraform/gitignore
      /Users/mr.minnu/hey/hey_server/aws/terraform/vpc.tf
      /Users/mr.minnu/hey/hey_server/aws/scripts/start_server
      /Users/mr.minnu/hey/hey_server/aws/scripts/appspec.yml
      /Users/mr.minnu/hey/hey_server/aws/scripts/run_serverpod
      /Users/mr.minnu/hey/hey_server/aws/scripts/install_dependencies
      /Users/mr.minnu/hey/hey_server/gitignore
      /Users/mr.minnu/hey/hey_client/CHANGELOG.md
      /Users/mr.minnu/hey/hey_client/README.md
      /Users/mr.minnu/hey/hey_client/pubspec.yaml
      /Users/mr.minnu/hey/hey_client/lib/projectname_client.dart
      /Users/mr.minnu/hey/hey_client/lib/src/protocol/client.dart
      /Users/mr.minnu/hey/hey_client/lib/src/protocol/protocol.dart
      /Users/mr.minnu/hey/hey_client/lib/src/protocol/example.dart
      /Users/mr.minnu/hey/hey_client/analysis_options.yaml
      /Users/mr.minnu/hey/hey_client/gitignore
      /Users/mr.minnu/hey/hey_flutter/test/widget_test.dart
      /Users/mr.minnu/hey/hey_flutter/README.md
      /Users/mr.minnu/hey/hey_flutter/pubspec.yaml
      /Users/mr.minnu/hey/hey_flutter/lib/main.dart
      /Users/mr.minnu/hey/hey_flutter/analysis_options.yaml
      /Users/mr.minnu/hey/hey_flutter/gitignore
      /Users/mr.minnu/hey/.github/workflows/deployment-aws.yml
    
    Running `dart pub get` in /Users/mr.minnu/hey/hey_server
    Resolving dependencies...
    + args 2.3.1
    + async 2.10.0
    + buffer 1.1.1
    + collection 1.17.0
    + crypto 3.0.2
    + executor 2.2.2
    + http 0.13.5
    + http_parser 4.0.2
    + lints 2.0.1
    + meta 1.8.0
    + mustache_template 2.0.0
    + path 1.8.3
    + pedantic 1.11.1
    + postgres 2.5.2
    + postgres_pool 2.1.5
    + redis 3.1.0
    + retry 3.1.0
    + sasl_scram 0.1.1
    + saslprep 1.0.2
    + serverpod 0.9.21
    + serverpod_client 0.9.21
    + serverpod_serialization 0.9.21
    + serverpod_service_client 0.9.21
    + serverpod_shared 0.9.21
    + source_span 1.9.1
    + stack_trace 1.11.0
    + stream_channel 2.1.1
    + string_scanner 1.2.0
    + synchronized 3.0.0+3
    + system_resources 1.6.0
    + term_glyph 1.2.1
    + typed_data 1.3.1
    + unorm_dart 0.2.0
    + vm_service 9.4.0
    + web_socket_channel 2.2.0
    + yaml 3.1.1
    Changed 36 dependencies!
    
    Running `dart pub get` in /Users/mr.minnu/hey/hey_client
    Resolving dependencies...
    + async 2.10.0
    + collection 1.17.0
    + crypto 3.0.2
    + http 0.13.5
    + http_parser 4.0.2
    + meta 1.8.0
    + path 1.8.3
    + serverpod_client 0.9.21
    + serverpod_serialization 0.9.21
    + source_span 1.9.1
    + stream_channel 2.1.1
    + string_scanner 1.2.0
    + term_glyph 1.2.1
    + typed_data 1.3.1
    + web_socket_channel 2.2.0
    + yaml 3.1.1
    Changed 16 dependencies!
    
    Running `flutter create .` in /Users/mr.minnu/hey/hey_flutter
    
    ┌─────────────────────────────────────────────────────────┐
    │ A new version of Flutter is available!                  │
    │                                                         │
    │ To update to the latest version, run "flutter upgrade". │
    └─────────────────────────────────────────────────────────┘
    Signing iOS app for device deployment using developer identity: "Apple Development: [email protected] (U58CK2895J)"
    Recreating project ....
      windows/runner/flutter_window.cpp (created)
      windows/runner/utils.h (created)
      windows/runner/utils.cpp (created)
      windows/runner/runner.exe.manifest (created)
      windows/runner/CMakeLists.txt (created)
      windows/runner/win32_window.h (created)
      windows/runner/Runner.rc (created)
      windows/runner/win32_window.cpp (created)
      windows/runner/resources/app_icon.ico (created)
      windows/runner/main.cpp (created)
      windows/runner/resource.h (created)
      windows/runner/flutter_window.h (created)
      windows/flutter/CMakeLists.txt (created)
      windows/.gitignore (created)
      windows/CMakeLists.txt (created)
      ios/Runner.xcworkspace/contents.xcworkspacedata (created)
      ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
      ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created)
      ios/Runner/Info.plist (created)
      ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] (created)
      ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md (created)
      ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (created)
      ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] (created)
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
      ios/Runner/Base.lproj/LaunchScreen.storyboard (created)
      ios/Runner/Base.lproj/Main.storyboard (created)
      ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (created)
      ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
      ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created)
      ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (created)
      ios/Flutter/Debug.xcconfig (created)
      ios/Flutter/Release.xcconfig (created)
      ios/Flutter/AppFrameworkInfo.plist (created)
      ios/.gitignore (created)
      hey_flutter.iml (created)
      web/favicon.png (created)
      web/index.html (created)
      web/manifest.json (created)
      web/icons/Icon-maskable-512.png (created)
      web/icons/Icon-192.png (created)
      web/icons/Icon-maskable-192.png (created)
      web/icons/Icon-512.png (created)
      macos/Runner.xcworkspace/contents.xcworkspacedata (created)
      macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
      macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png (created)
      macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png (created)
      macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png (created)
      macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png (created)
      macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png (created)
      macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (created)
      macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png (created)
      macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png (created)
      macos/Runner/DebugProfile.entitlements (created)
      macos/Runner/Base.lproj/MainMenu.xib (created)
      macos/Runner/MainFlutterWindow.swift (created)
      macos/Runner/Configs/Debug.xcconfig (created)
      macos/Runner/Configs/Release.xcconfig (created)
      macos/Runner/Configs/Warnings.xcconfig (created)
      macos/Runner/Configs/AppInfo.xcconfig (created)
      macos/Runner/AppDelegate.swift (created)
      macos/Runner/Info.plist (created)
      macos/Runner/Release.entitlements (created)
      macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
      macos/Runner.xcodeproj/project.pbxproj (created)
      macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (created)
      macos/Flutter/Flutter-Debug.xcconfig (created)
      macos/Flutter/Flutter-Release.xcconfig (created)
      macos/.gitignore (created)
      android/app/src/profile/AndroidManifest.xml (created)
      android/app/src/main/res/mipmap-mdpi/ic_launcher.png (created)
      android/app/src/main/res/mipmap-hdpi/ic_launcher.png (created)
      android/app/src/main/res/drawable/launch_background.xml (created)
      android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (created)
      android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (created)
      android/app/src/main/res/values-night/styles.xml (created)
      android/app/src/main/res/values/styles.xml (created)
      android/app/src/main/res/drawable-v21/launch_background.xml (created)
      android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (created)
      android/app/src/main/AndroidManifest.xml (created)
      android/app/src/debug/AndroidManifest.xml (created)
      android/gradle/wrapper/gradle-wrapper.properties (created)
      android/gradle.properties (created)
      android/.gitignore (created)
      android/settings.gradle (created)
      android/app/build.gradle (created)
      android/app/src/main/kotlin/com/example/hey_flutter/MainActivity.kt (created)
      android/build.gradle (created)
      android/hey_flutter_android.iml (created)
      ios/Runner/Runner-Bridging-Header.h (created)
      ios/Runner/AppDelegate.swift (created)
      ios/Runner.xcodeproj/project.pbxproj (created)
      .idea/runConfigurations/main_dart.xml (created)
      .idea/libraries/Dart_SDK.xml (created)
      .idea/libraries/KotlinJavaRuntime.xml (created)
      .idea/modules.xml (created)
      .idea/workspace.xml (created)
      linux/main.cc (created)
      linux/my_application.h (created)
      linux/my_application.cc (created)
      linux/flutter/CMakeLists.txt (created)
      linux/.gitignore (created)
      linux/CMakeLists.txt (created)
    Running "flutter pub get" in hey_flutter...
    Resolving dependencies...
    + args 2.3.1
    + async 2.10.0
    + boolean_selector 2.1.1
    + characters 1.2.1
    + clock 1.1.1
    + collection 1.17.0
    + connectivity_plus 2.3.9 (3.0.2 available)
    + connectivity_plus_linux 1.3.1
    + connectivity_plus_macos 1.2.6
    + connectivity_plus_platform_interface 1.2.3
    + connectivity_plus_web 1.2.5
    + connectivity_plus_windows 1.2.2
    + crypto 3.0.2
    + cupertino_icons 1.0.5
    + dbus 0.7.8
    + fake_async 1.3.1
    + ffi 2.0.1
    + flutter 0.0.0 from sdk flutter
    + flutter_lints 2.0.1
    + flutter_test 0.0.0 from sdk flutter
    + flutter_web_plugins 0.0.0 from sdk flutter
    + hey_client 0.0.0 from path ../hey_client
    + http 0.13.5
    + http_parser 4.0.2
    + js 0.6.5 (0.6.6 available)
    + lints 2.0.1
    + matcher 0.12.13 (0.12.14 available)
    + material_color_utilities 0.2.0
    + meta 1.8.0
    + nm 0.5.0
    + path 1.8.2 (1.8.3 available)
    + petitparser 5.1.0
    + plugin_platform_interface 2.1.3
    + serverpod_client 0.9.21
    + serverpod_flutter 0.9.21
    + serverpod_serialization 0.9.21
    + sky_engine 0.0.99 from sdk flutter
    + source_span 1.9.1
    + stack_trace 1.11.0
    + stream_channel 2.1.1
    + string_scanner 1.2.0
    + term_glyph 1.2.1
    + test_api 0.4.16 (0.4.17 available)
    + typed_data 1.3.1
    + vector_math 2.1.4
    + web_socket_channel 2.2.0
    + xml 6.2.2
    + yaml 3.1.1
    Changed 48 dependencies!
    Wrote 121 files.
    
    All done!
    You can find general documentation for Flutter at: https://docs.flutter.dev/
    Detailed API documentation is available at: https://api.flutter.dev/
    If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev
    
    In order to run your application, type:
    
      $ cd .
      $ flutter run
    
    Your application code is in ./lib/main.dart.
    
    
    Setting up Docker and default database tables in /Users/mr.minnu/hey/hey_server
    If you run serverpod create for the first time, this can take a few minutes as
    Docker is downloading the images for Postgres. If you get stuck at this step,
    make sure that you have the latest version of Docker Desktop and that it is
    currently running.
    
    Starting docker
    Volume "hey_server_hey_data"  Creating
    Volume "hey_server_hey_data"  Created
    Container hey_server-postgres-1  Creating
    Container hey_server-redis-1  Creating
    Container hey_server-postgres-1  Created
    Container hey_server-redis-1  Created
    Container hey_server-redis-1  Starting
    Container hey_server-postgres-1  Starting
    Container hey_server-postgres-1  Started
    Container hey_server-redis-1  Started
    Postgres is ready
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE INDEX
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE TABLE
    ALTER TABLE
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    CREATE INDEX
    CREATE INDEX
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    ALTER TABLE
    CREATE TABLE
    ALTER TABLE
    ALTER TABLE
    CREATE TABLE
    ALTER TABLE
    CREATE INDEX
    ALTER TABLE
    Stopping docker
    Container hey_server-redis-1  Stopping
    Container hey_server-postgres-1  Stopping
    Container hey_server-postgres-1  Stopped
    Container hey_server-redis-1  Stopped
    Completed table setup exit code: 0
    
    
    SERVERPOD CREATED 🥳
    
    All setup. You are ready to rock!
    
    Start your Serverpod by running:
    
      $ cd hey/hey_server
      $ docker-compose up --build --detach
      $ dart bin/main.dart
    
    
    opened by yahu1031 2
Owner
Serverpod
Serverpod is a next-generation app and web server, explicitly built for the Flutter and Dart ecosystem.
Serverpod
Dart web - Experimental web framework for Dart. Supports SPA and SSR

dart_web Experimental web framework for Dart. Supports SPA and SSR. Relies on pa

Kilian Schulte 307 Dec 23, 2022
Binder is a web framework that can be used to create web apps and APIs .

Binder Framework Binder is a web framework that can be used to create web apps and APIs . It's like React + Express or any combination of front-end fr

Kab Agouda 8 Sep 13, 2022
Pure Dart Argon2 algorithm (the winner of the Password Hash Competition 2015) for all Dart platforms (JS/Web, Flutter, VM/Native).

argon2 Pure Dart Argon2 algorithm (the winner of the Password Hash Competition 2015) for all Dart platforms (JS/Web, Flutter, VM/Native). Based on the

Graciliano Monteiro Passos 8 Dec 22, 2021
Experimental web framework for Dart. Supports SPAs and SSR.

jaspr Experimental web framework for Dart. Supports SPAs and SSR. Main Features: Familiar component model similar to Flutter widgets Easy Server Side

Kilian Schulte 310 Jan 4, 2023
Dawn - a Dart web package for developing UIs in a pattern similar to Flutter.

dawn Description Dawn is a Dart web package for developing UIs in a pattern similar to Flutter. Links GitHub Repository Pub Page Documentation An Exam

Hamed Aarab 45 Jan 6, 2023
A platform adaptive Flutter app for desktop, mobile and web.

Flutter Folio A demo app showcasing how Flutter can deliver a great multi-platform experience, targeting iOS, Android, MacOS, Windows, Linux, and web.

gskinner team 3.5k Jan 2, 2023
Fluttern is a web app made with Flutter to list Flutter internships/jobs for the community.

Fluttern Fluttern is a web app made with Flutter to list Flutter internships/jobs for the community. It uses Google Sheet as a backend, simplifying th

Aditya Thakur 3 Jan 5, 2022
A project that makes use of a Typescript back end and a Flutter web front end to consume the Jira API in order to visualize and interact with issues.

A project that makes use of a Typescript back end and a Flutter web front end to consume the Jira API in order to visualize and interact with issues.

Lucas Coelho 1 Mar 20, 2022
A web dashboard that allows you to monitor your Chia farm and sends notifications when blocks are found and new plots are completed through a discord bot. It can link multiple farmers/harvesters to your account.

farmr A web dashboard that allows you to monitor your Chia farm and sends notifications when blocks are found and new plots are completed through a di

Gil Nobrega 261 Nov 10, 2022
An eventual FIBS client written in Flutter and hosted on the web

fibscli An eventual FIBS client written in Flutter and hosted on the web. status Currently, the app works as a stand-alone backgammon game w/o connect

Chris Sells 10 Oct 26, 2022
File picker plugin for Flutter, compatible with mobile (iOS & Android), Web, Desktop (Mac, Linux, Windows) platforms with Flutter Go support.

A package that allows you to use the native file explorer to pick single or multiple files, with extensions filtering support.

Miguel Ruivo 987 Jan 6, 2023
A Portfolio Website - Flutter Web

A Portfolio Website - Flutter Web Watch it on YouTube This UI is not Responsive A nice clean Portfolio Website for Designer or developers. Which inclu

Abu Anwar 355 Dec 31, 2022
A Flutter Web Plugin to display Text Widget as Html for SEO purpose

SEO Renderer A flutter plugin (under development) to render text widgets as html elements for SEO purpose. Created specifically for issue https://gith

Sahdeep Singh 103 Nov 21, 2022
Flutter Installer is an installer for Flutter built with Flutter 💙😎✌

Flutter Installer Flutter Installer is an installer for Flutter built with Flutter ?? ?? ✌ Flutter and the related logo are trademarks of Google LLC.

Yazeed AlKhalaf 406 Dec 27, 2022
Invoice Ninja client built with Flutter

Invoice Ninja Client app for the Invoice Ninja web app. Google Play Store: v4 | v5 Apple App Store: v4 | v5 Setting up the app Initialize the config f

Invoice Ninja 1.3k Dec 30, 2022
A nice clean Portfolio Website for Designer or developers Built Using Flutter

A Portfolio Website - Flutter Web Watch it on YouTube This UI is not Responsive A nice clean Portfolio Website for Designer or developers. Which inclu

Elias Baya 1 Aug 17, 2022
A lightweight personal portfolio website template built using Flutter

Dev Portfolio Software Developer Portfolio Template that helps you showcase your

AbdulMomen 18 Dec 23, 2022
Photon is a cross-platform file-sharing application built using flutter.

Welcome to Photon ?? Photon is a cross-platform file-transfer application built using flutter. It uses http to transfer files between devices.You can

Abhilash Hegde 161 Jan 1, 2023
Biyi (比译) is a convenient translation and dictionary app written in dart / Flutter.

biyi_app Biyi is a convenient translation and dictionary app written in dart / Flutter. View document "Biyi" (比译) is the Chinese word for "Comparison

biyidev 894 Jan 1, 2023