You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to know how to execute custom code with a main.dart file containing properties like the example below (from the Unpub documentation):
import 'package:mongo_dart/mongo_dart.dart';
import 'package:unpub/unpub.dart' as unpub;
main(List<String> args) async {
final db = Db('mongodb://localhost:27017/dart_pub');
await db.open(); // ensure the MongoDB connection is open
final app = unpub.App(
metaStore: unpub.MongoStore(db),
overrideUploaderEmail: '[email protected]',
packageStore: unpub.FileStore('./unpub-packages'),
);
final server = await app.serve('0.0.0.0', 4000);
print('Serving at http://${server.address.host}:${server.port}');
}
Thank you!
The text was updated successfully, but these errors were encountered:
Hello, thank you for this repository!
I would like to know how to execute custom code with a main.dart file containing properties like the example below (from the Unpub documentation):
Thank you!
The text was updated successfully, but these errors were encountered: